[ARP]: Introduce the arp_hdr_len helper.
[deliverable/linux.git] / drivers / net / bonding / bond_main.c
index 0942d82f7cbf721f62c364941a13b31373668c5b..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);
@@ -3511,6 +3508,9 @@ static int bond_inetaddr_event(struct notifier_block *this, unsigned long event,
        struct bonding *bond, *bond_next;
        struct vlan_entry *vlan, *vlan_next;
 
+       if (ifa->ifa_dev->dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        list_for_each_entry_safe(bond, bond_next, &bond_dev_list, bond_list) {
                if (bond->dev == event_dev) {
                        switch (event) {
This page took 0.049895 seconds and 5 git commands to generate.