bonding: create netlink event when bonding option is changed
authorJiri Pirko <jiri@resnulli.us>
Tue, 19 Aug 2014 14:02:12 +0000 (16:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Aug 2014 19:33:47 +0000 (12:33 -0700)
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>
drivers/net/bonding/bond_options.c
include/linux/netdevice.h

index dc73463c2c237d99bf26c9b3ff21512c36f69504..d8dc17faa6b4cba1e5196e1ebdd8fda09eb49a5c 100644 (file)
@@ -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;
 }
index 38377392d08261291ceb1fcd177718484e05581c..7e2b0b8b5cd7197bce6a649277b292d6bd44415c 100644 (file)
@@ -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);