summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2014-08-19 18:02:12 +0400
committerDavid S. Miller <davem@davemloft.net>2014-08-22 23:33:47 +0400
commitd4261e5650004d6d51137553ea5433d5828562dc (patch)
treef2129a27e8a66c0cb6925ded068a8f9201379317
parent0c32ec8f5ba885fda08b1b822158b6135e56a308 (diff)
downloadlinux-d4261e5650004d6d51137553ea5433d5828562dc.tar.xz
bonding: create netlink event when bonding option is changed
Userspace needs to be notified if one changes some option. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Veaceslav Falico <vfalico@gmail.com> Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bonding/bond_options.c2
-rw-r--r--include/linux/netdevice.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index dc73463c2c23..d8dc17faa6b4 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -625,6 +625,8 @@ int __bond_opt_set(struct bonding *bond,
out:
if (ret)
bond_opt_error_interpret(bond, opt, ret, val);
+ else
+ call_netdevice_notifiers(NETDEV_CHANGEINFODATA, bond->dev);
return ret;
}
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 38377392d082..7e2b0b8b5cd7 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1982,6 +1982,7 @@ struct pcpu_sw_netstats {
#define NETDEV_CHANGEUPPER 0x0015
#define NETDEV_RESEND_IGMP 0x0016
#define NETDEV_PRECHANGEMTU 0x0017 /* notify before mtu change happened */
+#define NETDEV_CHANGEINFODATA 0x0018
int register_netdevice_notifier(struct notifier_block *nb);
int unregister_netdevice_notifier(struct notifier_block *nb);