Skip to content

Commit

Permalink
netfilter: log invalid new icmpv6 packet with nf_log_packet()
Browse files Browse the repository at this point in the history
This patch adds a logging message for invalid new icmpv6 packet.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Eric Leblond authored and Patrick McHardy committed Feb 18, 2009
1 parent 842bff3 commit 55df4ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ static bool icmpv6_new(struct nf_conn *ct, const struct sk_buff *skb,
pr_debug("icmpv6: can't create new conn with type %u\n",
type + 128);
nf_ct_dump_tuple_ipv6(&ct->tuplehash[0].tuple);
if (LOG_INVALID(nf_ct_net(ct), IPPROTO_ICMPV6))
nf_log_packet(PF_INET6, 0, skb, NULL, NULL, NULL,
"nf_ct_icmpv6: invalid new with type %d ",
type + 128);
return false;
}
atomic_set(&ct->proto.icmp.count, 0);
Expand Down

0 comments on commit 55df4ac

Please sign in to comment.