Skip to content

Commit

Permalink
[NETFILTER] ctnetlink: ICMP ID is not mandatory
Browse files Browse the repository at this point in the history
The ID is only required by ICMP type 8 (echo), so it's not
mandatory for all sort of ICMP connections. This patch makes
mandatory only the type and the code for ICMP netlink messages.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pablo Neira Ayuso authored and David S. Miller committed Oct 11, 2005
1 parent d000eaf commit a1bcc3f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ip_conntrack_proto_icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ static int icmp_nfattr_to_tuple(struct nfattr *tb[],
struct ip_conntrack_tuple *tuple)
{
if (!tb[CTA_PROTO_ICMP_TYPE-1]
|| !tb[CTA_PROTO_ICMP_CODE-1]
|| !tb[CTA_PROTO_ICMP_ID-1])
|| !tb[CTA_PROTO_ICMP_CODE-1])
return -1;

tuple->dst.u.icmp.type =
Expand Down

0 comments on commit a1bcc3f

Please sign in to comment.