summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJiri Pirko2010-03-19 05:00:23 +0100
committerDavid S. Miller2010-03-22 02:31:34 +0100
commit32a806c194ea112cfab00f558482dd97bee5e44e (patch)
tree196f572deccc966b3e2682f293cf775b51007658 /net/core
parentnet: rtnetlink: ignore NETDEV_PRE_TYPE_CHANGE in rtnetlink_event() (diff)
downloadkernel-qcow2-linux-32a806c194ea112cfab00f558482dd97bee5e44e.tar.gz
kernel-qcow2-linux-32a806c194ea112cfab00f558482dd97bee5e44e.tar.xz
kernel-qcow2-linux-32a806c194ea112cfab00f558482dd97bee5e44e.zip
bonding: flush unicast and multicast lists when changing type
After the type change, addresses in unicast and multicast lists wouldn't make sense, not to mention possible different lenghts. So flush both lists here. Note "dev_addr_discard" will be very soon replaced by "dev_mc_flush" (once mc_list conversion will be done). Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index c0e260870c0a..fe2a754238a9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4457,12 +4457,13 @@ void dev_unicast_unsync(struct net_device *to, struct net_device *from)
}
EXPORT_SYMBOL(dev_unicast_unsync);
-static void dev_unicast_flush(struct net_device *dev)
+void dev_unicast_flush(struct net_device *dev)
{
netif_addr_lock_bh(dev);
__hw_addr_flush(&dev->uc);
netif_addr_unlock_bh(dev);
}
+EXPORT_SYMBOL(dev_unicast_flush);
static void dev_unicast_init(struct net_device *dev)
{
@@ -4484,7 +4485,7 @@ static void __dev_addr_discard(struct dev_addr_list **list)
}
}
-static void dev_addr_discard(struct net_device *dev)
+void dev_addr_discard(struct net_device *dev)
{
netif_addr_lock_bh(dev);
@@ -4493,6 +4494,7 @@ static void dev_addr_discard(struct net_device *dev)
netif_addr_unlock_bh(dev);
}
+EXPORT_SYMBOL(dev_addr_discard);
/**
* dev_get_flags - get flags reported to userspace