-
Ziyang Xuan authored
Like commit ea30388b ("ipv6: Fix an uninit variable access bug in __ip6_make_skb()"). icmphdr does not in skb linear region under the scenario of SOCK_RAW socket. Access icmp_hdr(skb)->type directly will trigger the uninit variable access bug. Use a local variable icmp_type to carry the correct value in different scenarios. Fixes: 96793b48 ("[IPV4]: Add ICMPMsgStats MIB (RFC 4293)") Reviewed-by:
Willem de Bruijn <willemb@google.com> Signed-off-by:
Ziyang Xuan <william.xuanziyang@huawei.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
99e5acae