Fix ICMP id type
Subsystems (2)
Pablo Neira
maintainerPATCH 6/8 Fix ICMP id type
ICMP_ID is u_int16_t not u_int8_t. Handle this properly.
Signed-off-by Krzysztof Piotr Oledzki <[email protected]>
Signed-off-by Pablo Neira Ayuso <[email protected]>
Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
ICMP_ID is u_int16_t not u_int8_t. Handle this properly.
Signed-off-by Krzysztof Piotr Oledzki <[email protected]>
Signed-off-by Pablo Neira Ayuso <[email protected]>
net/ipv4/netfilter/ip_conntrack_proto_icmp.c +1 -1
@@ -305,7 +305,7 @@ static int icmp_nfattr_to_tuple(struct n tuple->dst.u.icmp.code = *(u_int8_t *)NFA_DATA (tb[CTA_PROTO_ICMP_CODE -1 ]); tuple->src.u.icmp.id = - *(u_int8_t *)NFA_DATA (tb[CTA_PROTO_ICMP_ID -1 ]); + *(u_int16_t *)NFA_DATA (tb[CTA_PROTO_ICMP_ID -1 ]);return 0 ; }
Harald Welte
AppliedQuoted 1 line · Pablo Neira
ICMP_IDisu_int16_tnotu_int8_t. Handle this properly.
thanks, applied.
Signature · 5 lines
- Harald Welte <[email protected]> http://netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie