• Vlad Yasevich's avatar
    bonding: Prevent duplicate userspace notification · 7a7e96e0
    Vlad Yasevich authored
    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: default avatarVladislav Yasevich <vyasevic@redhat.com>
    Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7a7e96e0
bond_options.h 3.92 KB