diff options
author | Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> | 2014-06-05 07:53:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-05 18:20:31 -0400 |
commit | e0a47d1f781665d2aa126b804572314d128a0070 (patch) | |
tree | 33e5c9567445408009567209adcd7abec9f20aed /net/bridge | |
parent | 5fb22ee5a2cc2b32f2b64015cc679e24ed6f50d4 (diff) |
bridge: Fix incorrect judgment of promisc
br_manage_promisc() incorrectly expects br_auto_port() to return only 0
or 1, while it actually returns flags, i.e., a subset of BR_AUTO_MASK.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_if.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index a08d2b8ebba6..3eca3fdf8fe1 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -153,7 +153,8 @@ void br_manage_promisc(struct net_bridge *br) | |||
153 | * This lets us disable promiscuous mode and write | 153 | * This lets us disable promiscuous mode and write |
154 | * this config to hw. | 154 | * this config to hw. |
155 | */ | 155 | */ |
156 | if (br->auto_cnt <= br_auto_port(p)) | 156 | if (br->auto_cnt == 0 || |
157 | (br->auto_cnt == 1 && br_auto_port(p))) | ||
157 | br_port_clear_promisc(p); | 158 | br_port_clear_promisc(p); |
158 | else | 159 | else |
159 | br_port_set_promisc(p); | 160 | br_port_set_promisc(p); |