Skip to content

Commit aa6a03e

Browse files
committed
netfilter: xt_osf: fix nf_log_packet() arguments
The first argument is the address family, the second one the hook number. Signed-off-by: Patrick McHardy <kaber@trash.net>
1 parent 3f1f7cf commit aa6a03e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

net/netfilter/xt_osf.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ static bool xt_osf_match_packet(const struct sk_buff *skb,
330330
fcount++;
331331

332332
if (info->flags & XT_OSF_LOG)
333-
nf_log_packet(p->hooknum, 0, skb, p->in, p->out, NULL,
333+
nf_log_packet(p->family, p->hooknum, skb,
334+
p->in, p->out, NULL,
334335
"%s [%s:%s] : %pi4:%d -> %pi4:%d hops=%d\n",
335336
f->genre, f->version, f->subtype,
336337
&ip->saddr, ntohs(tcp->source),
@@ -345,7 +346,7 @@ static bool xt_osf_match_packet(const struct sk_buff *skb,
345346
rcu_read_unlock();
346347

347348
if (!fcount && (info->flags & XT_OSF_LOG))
348-
nf_log_packet(p->hooknum, 0, skb, p->in, p->out, NULL,
349+
nf_log_packet(p->family, p->hooknum, skb, p->in, p->out, NULL,
349350
"Remote OS is not known: %pi4:%u -> %pi4:%u\n",
350351
&ip->saddr, ntohs(tcp->source),
351352
&ip->daddr, ntohs(tcp->dest));

0 commit comments

Comments
 (0)