[ARP]: Introduce the arp_hdr_len helper.
[deliverable/linux.git] / drivers / net / bonding / bond_main.c
index 966643473da7175fa7d0ef25dc35f38d7f8c1dc5..5fc9d8d58ecef06e25c0cfc99444e8d298f65c48 100644 (file)
@@ -2646,10 +2646,7 @@ static int bond_arp_rcv(struct sk_buff *skb, struct net_device *dev, struct pack
        if (!slave || !slave_do_arp_validate(bond, slave))
                goto out_unlock;
 
-       /* ARP header, plus 2 device addresses, plus 2 IP addresses.  */
-       if (!pskb_may_pull(skb, (sizeof(struct arphdr) +
-                                (2 * dev->addr_len) +
-                                (2 * sizeof(u32)))))
+       if (!pskb_may_pull(skb, arp_hdr_len(dev)))
                goto out_unlock;
 
        arp = arp_hdr(skb);
This page took 0.0252289999999999 seconds and 5 git commands to generate.