netfilter: reject: fix ICMP csum verification
Subsystems (2)
PATCH 1/1 netfilter: reject: fix ICMP csum verification
From: Alin Nastac <[email protected]>
Typically transport protocols such as TCP and UDP use an IP pseudo-header for their checksum computation, but ICMP does not use it.
Fixes 7fc38225363dd ("netfilter: reject: skip csum verification for protocols that don't support it")
Signed-off-by Alin Nastac <[email protected]>
--- net/ipv4/netfilter/nf_reject_ipv4.c | 4 ++++ 1 file changed, 4 insertions(+)
net/ipv4/netfilter/nf_reject_ipv4.c +4 -0
@@ -180,6 +180,10 @@ void nf_send_unreach(struct sk_buff *skb_in, int code, int hook)return ; } +/* ICMP checksum computation does not use an IP pseudo-header */ +if (proto ==IPPROTO_ICMP ) + proto =0 ; +if (nf_ip_checksum (skb_in, hook,ip_hdrlen (skb_in), proto) ==0 )icmp_send (skb_in,ICMP_DEST_UNREACH , code,0 ); }
Signature · 1 line
2.7.4
Pablo Neira Ayuso
maintainerQuoted 5 lines · Alin Nastac
From: Alin Nastac <[email protected]>
Typically transport protocols such as TCP and UDP use an IP pseudo-header for their checksum computation, but ICMP does not use it.
Already fixed upstream?
commit 5d1549847c76b1ffcf8e388ef4d0f229bdd1d7e8
Author: He Zhe <[email protected]> Date: Mon Jun 24 11:17:38 2019 +0800
netfilter: Fix remainder of pseudo-header protocol 0
Quoted 7 lines · Pablo Neira Ayuso
Already fixed upstream?
commit
5d1549847c76b1ffcf8e388ef4d0f229bdd1d7e8Author: He Zhe <[email protected]> Date: Mon Jun 24 11:17:38 2019 +0800netfilter: Fix remainder of pseudo-header protocol 0
Yup, discard my patch pls.