Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arp: Do not perturb drop profiles with ignored ARP packets

We do not wish to disturb dropwatch or perf drop profiles with an ARP
we will ignore.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Rick Jones and committed by
David S. Miller
825bae5d 18d0264f

+5 -1
+5 -1
net/ipv4/arp.c
··· 953 953 { 954 954 const struct arphdr *arp; 955 955 956 + /* do not tweak dropwatch on an ARP we will ignore */ 956 957 if (dev->flags & IFF_NOARP || 957 958 skb->pkt_type == PACKET_OTHERHOST || 958 959 skb->pkt_type == PACKET_LOOPBACK) 959 - goto freeskb; 960 + goto consumeskb; 960 961 961 962 skb = skb_share_check(skb, GFP_ATOMIC); 962 963 if (!skb) ··· 975 974 976 975 return NF_HOOK(NFPROTO_ARP, NF_ARP_IN, skb, dev, NULL, arp_process); 977 976 977 + consumeskb: 978 + consume_skb(skb); 979 + return 0; 978 980 freeskb: 979 981 kfree_skb(skb); 980 982 out_of_mem: