Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1bcc3f2 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso Committed by David S. Miller
Browse files

[NETFILTER] ctnetlink: ICMP ID is not mandatory



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: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarHarald Welte <laforge@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d000eaf7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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 =