* [VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device
@ 2008-03-26 5:44 Patrick McHardy
2008-03-26 7:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2008-03-26 5:44 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1221 bytes --]
commit 23309e2679f45ffd6406a269310742a05eabfd99
Author: Patrick McHardy <kaber@trash.net>
Date: Wed Mar 26 06:29:07 2008 +0100
[VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device
Changing these flags requires to use dev_set_allmulti/dev_set_promiscuity
or dev_change_flags. Setting it directly causes two unwanted effects:
- the next dev_change_flags call will notice a difference between
dev->gflags and the actual flags, enable promisc/allmulti
mode and incorrectly update dev->gflags
- this keeps the underlying device in promisc/allmulti mode until
the VLAN device is deleted
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 1e5c990..cd573b3 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -660,7 +660,7 @@ static int vlan_dev_init(struct net_device *dev)
int subclass = 0;
/* IFF_BROADCAST|IFF_MULTICAST; ??? */
- dev->flags = real_dev->flags & ~IFF_UP;
+ dev->flags = real_dev->flags & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI);
dev->iflink = real_dev->ifindex;
dev->state = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) |
(1<<__LINK_STATE_DORMANT))) |
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device
2008-03-26 5:44 [VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device Patrick McHardy
@ 2008-03-26 7:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-03-26 7:15 UTC (permalink / raw)
To: kaber; +Cc: netdev
From: Patrick McHardy <kaber@trash.net>
Date: Wed, 26 Mar 2008 06:44:40 +0100
> commit 23309e2679f45ffd6406a269310742a05eabfd99
> Author: Patrick McHardy <kaber@trash.net>
> Date: Wed Mar 26 06:29:07 2008 +0100
>
> [VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device
>
> Changing these flags requires to use dev_set_allmulti/dev_set_promiscuity
> or dev_change_flags. Setting it directly causes two unwanted effects:
>
> - the next dev_change_flags call will notice a difference between
> dev->gflags and the actual flags, enable promisc/allmulti
> mode and incorrectly update dev->gflags
>
> - this keeps the underlying device in promisc/allmulti mode until
> the VLAN device is deleted
>
> Signed-off-by: Patrick McHardy <kaber@trash.net>
Applied and I'll queue this up for -stable too.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-26 7:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-26 5:44 [VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device Patrick McHardy
2008-03-26 7:15 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.