Message ID | 1431478394-8257-1-git-send-email-vyasevic@redhat.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Vladislav Yasevich <vyasevich@gmail.com> Date: Tue, 12 May 2015 20:53:14 -0400 > Currently vlan notifier handler will try to update all vlans > for a device when that device comes up. A problem occurs, > however, when the vlan device was set to promiscuous, but not > by the user (ex: a bridge). In that case, dev->gflags are > not updated. What results is that the lower device ends > up with an extra promiscuity count. Here are the > backtraces that prove this: ... > The above comes from the setting the vlan device to IFF_UP state. ... > And this one comes from the notification code. What we end > up with is a vlan with promiscuity count of 1 and and a physical > device with a promiscuity count of 2. They should both have > a count 1. > > To resolve this issue, vlan code can use dev_get_flags() api > which correctly masks promiscuity and allmulti flags. Applied, thanks Vlad. > Sign-off-by: Vlad Yasevich <vyasevic@redhat.com> Note, it's "Signed-off-by:" not "Sign-off-by:" I fixed this for you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 98a30a5..59555f0 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -443,7 +443,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, case NETDEV_UP: /* Put all VLANs for this dev in the up state too. */ vlan_group_for_each_dev(grp, i, vlandev) { - flgs = vlandev->flags; + flgs = dev_get_flags(vlandev); if (flgs & IFF_UP) continue;