summaryrefslogtreecommitdiffstats
path: root/include/net/bond_options.h
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevich@gmail.com>2017-05-27 10:14:35 -0400
committerDavid S. Miller <davem@davemloft.net>2017-05-27 18:51:41 -0400
commit7a7e96e09d463c7c3d51a51c539ae4352085ed18 (patch)
treee71e607d845b7a87f50eace22efa40f63621081e /include/net/bond_options.h
parent3d3ea5af5c0b382bc9d9aed378fd814fb5d4a011 (diff)
downloadlinux-stable-7a7e96e09d463c7c3d51a51c539ae4352085ed18.tar.gz
linux-stable-7a7e96e09d463c7c3d51a51c539ae4352085ed18.tar.bz2
linux-stable-7a7e96e09d463c7c3d51a51c539ae4352085ed18.zip
bonding: Prevent duplicate userspace notification
Whenever a user changes bonding options, a NETDEV_CHANGEINFODATA notificatin is generated which results in a rtnelink message to be sent. While runnig 'ip monitor', we can actually see 2 messages, one a result of the event, and the other a result of state change that is generated bo netdev_state_change(). However, this is not always the case. If bonding changes were done via sysfs or ifenslave (old ioctl interface), then only 1 message is seen. This patch removes duplicate messages in the case of using netlink to configure bonding. It introduceds a separte function that triggers a netdev event and uses that function in the syfs and ioctl cases. This was discovered while auditing all the different envents and continues the effort of cleaning up duplicated netlink messages. CC: David Ahern <dsa@cumulusnetworks.com> CC: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/bond_options.h')
-rw-r--r--include/net/bond_options.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/bond_options.h b/include/net/bond_options.h
index 1797235cd590..d79d28f5318c 100644
--- a/include/net/bond_options.h
+++ b/include/net/bond_options.h
@@ -104,6 +104,8 @@ struct bond_option {
int __bond_opt_set(struct bonding *bond, unsigned int option,
struct bond_opt_value *val);
+int __bond_opt_set_notify(struct bonding *bond, unsigned int option,
+ struct bond_opt_value *val);
int bond_opt_tryset_rtnl(struct bonding *bond, unsigned int option, char *buf);
const struct bond_opt_value *bond_opt_parse(const struct bond_option *opt,