aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/bonding/bond_main.c6
-rw-r--r--include/linux/notifier.h4
-rw-r--r--net/ipv4/devinet.c4
-rw-r--r--net/ipv6/addrconf.c16
4 files changed, 16 insertions, 14 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 430c02267d7e..7eeb18751d67 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1480,14 +1480,16 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1480 bond_dev->name, 1480 bond_dev->name,
1481 bond_dev->type, slave_dev->type); 1481 bond_dev->type, slave_dev->type);
1482 1482
1483 netdev_bonding_change(bond_dev, NETDEV_BONDING_OLDTYPE); 1483 netdev_bonding_change(bond_dev,
1484 NETDEV_PRE_TYPE_CHANGE);
1484 1485
1485 if (slave_dev->type != ARPHRD_ETHER) 1486 if (slave_dev->type != ARPHRD_ETHER)
1486 bond_setup_by_slave(bond_dev, slave_dev); 1487 bond_setup_by_slave(bond_dev, slave_dev);
1487 else 1488 else
1488 ether_setup(bond_dev); 1489 ether_setup(bond_dev);
1489 1490
1490 netdev_bonding_change(bond_dev, NETDEV_BONDING_NEWTYPE); 1491 netdev_bonding_change(bond_dev,
1492 NETDEV_POST_TYPE_CHANGE);
1491 } 1493 }
1492 } else if (bond_dev->type != slave_dev->type) { 1494 } else if (bond_dev->type != slave_dev->type) {
1493 pr_err("%s ether type (%d) is different from other slaves (%d), can not enslave it.\n", 1495 pr_err("%s ether type (%d) is different from other slaves (%d), can not enslave it.\n",
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index fee6c2f68075..f3635fc6e942 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -199,8 +199,8 @@ static inline int notifier_to_errno(int ret)
199#define NETDEV_FEAT_CHANGE 0x000B 199#define NETDEV_FEAT_CHANGE 0x000B
200#define NETDEV_BONDING_FAILOVER 0x000C 200#define NETDEV_BONDING_FAILOVER 0x000C
201#define NETDEV_PRE_UP 0x000D 201#define NETDEV_PRE_UP 0x000D
202#define NETDEV_BONDING_OLDTYPE 0x000E 202#define NETDEV_PRE_TYPE_CHANGE 0x000E
203#define NETDEV_BONDING_NEWTYPE 0x000F 203#define NETDEV_POST_TYPE_CHANGE 0x000F
204#define NETDEV_POST_INIT 0x0010 204#define NETDEV_POST_INIT 0x0010
205#define NETDEV_UNREGISTER_BATCH 0x0011 205#define NETDEV_UNREGISTER_BATCH 0x0011
206 206
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 51ca946e3392..c75320ef95c2 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1095,10 +1095,10 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
1095 case NETDEV_DOWN: 1095 case NETDEV_DOWN:
1096 ip_mc_down(in_dev); 1096 ip_mc_down(in_dev);
1097 break; 1097 break;
1098 case NETDEV_BONDING_OLDTYPE: 1098 case NETDEV_PRE_TYPE_CHANGE:
1099 ip_mc_unmap(in_dev); 1099 ip_mc_unmap(in_dev);
1100 break; 1100 break;
1101 case NETDEV_BONDING_NEWTYPE: 1101 case NETDEV_POST_TYPE_CHANGE:
1102 ip_mc_remap(in_dev); 1102 ip_mc_remap(in_dev);
1103 break; 1103 break;
1104 case NETDEV_CHANGEMTU: 1104 case NETDEV_CHANGEMTU:
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 3381b4317c27..8d41abc40db5 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -137,8 +137,8 @@ static DEFINE_SPINLOCK(addrconf_verify_lock);
137static void addrconf_join_anycast(struct inet6_ifaddr *ifp); 137static void addrconf_join_anycast(struct inet6_ifaddr *ifp);
138static void addrconf_leave_anycast(struct inet6_ifaddr *ifp); 138static void addrconf_leave_anycast(struct inet6_ifaddr *ifp);
139 139
140static void addrconf_bonding_change(struct net_device *dev, 140static void addrconf_type_change(struct net_device *dev,
141 unsigned long event); 141 unsigned long event);
142static int addrconf_ifdown(struct net_device *dev, int how); 142static int addrconf_ifdown(struct net_device *dev, int how);
143 143
144static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags); 144static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags);
@@ -2584,9 +2584,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
2584 return notifier_from_errno(err); 2584 return notifier_from_errno(err);
2585 } 2585 }
2586 break; 2586 break;
2587 case NETDEV_BONDING_OLDTYPE: 2587 case NETDEV_PRE_TYPE_CHANGE:
2588 case NETDEV_BONDING_NEWTYPE: 2588 case NETDEV_POST_TYPE_CHANGE:
2589 addrconf_bonding_change(dev, event); 2589 addrconf_type_change(dev, event);
2590 break; 2590 break;
2591 } 2591 }
2592 2592
@@ -2601,16 +2601,16 @@ static struct notifier_block ipv6_dev_notf = {
2601 .priority = 0 2601 .priority = 0
2602}; 2602};
2603 2603
2604static void addrconf_bonding_change(struct net_device *dev, unsigned long event) 2604static void addrconf_type_change(struct net_device *dev, unsigned long event)
2605{ 2605{
2606 struct inet6_dev *idev; 2606 struct inet6_dev *idev;
2607 ASSERT_RTNL(); 2607 ASSERT_RTNL();
2608 2608
2609 idev = __in6_dev_get(dev); 2609 idev = __in6_dev_get(dev);
2610 2610
2611 if (event == NETDEV_BONDING_NEWTYPE) 2611 if (event == NETDEV_POST_TYPE_CHANGE)
2612 ipv6_mc_remap(idev); 2612 ipv6_mc_remap(idev);
2613 else if (event == NETDEV_BONDING_OLDTYPE) 2613 else if (event == NETDEV_PRE_TYPE_CHANGE)
2614 ipv6_mc_unmap(idev); 2614 ipv6_mc_unmap(idev);
2615} 2615}
2616 2616