lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 20 Aug 2014 08:18:28 -0400 From: Neil Horman <nhorman@...driver.com> To: Jiri Pirko <jiri@...nulli.us> Cc: netdev@...r.kernel.org, davem@...emloft.net, j.vosburgh@...il.com, vfalico@...il.com, andy@...yhouse.net, nikolay@...hat.com, dingtianhong@...wei.com, sfeldma@...ulusnetworks.com Subject: Re: [patch net-next] bonding: create netlink event when bonding option is changed On Tue, Aug 19, 2014 at 04:02:12PM +0200, Jiri Pirko wrote: > Userspace needs to be notified if one changes some option. > > Signed-off-by: Jiri Pirko <jiri@...nulli.us> > --- > drivers/net/bonding/bond_options.c | 2 ++ > include/linux/netdevice.h | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c > index dc73463..d8dc17f 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 967ddcc..44bc4bd 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -2017,6 +2017,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 > Do you need to create a new netdev event here? Seems like it might be more concise to reuse NETDEV_CHANGE and expand the netdev_notifier_change_info struct. Neil > int register_netdevice_notifier(struct notifier_block *nb); > int unregister_netdevice_notifier(struct notifier_block *nb); > -- > 1.9.3 > > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@...r.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists