diff options
author | Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> | 2014-07-30 00:31:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-31 15:18:44 -0400 |
commit | 47fab41ab51a18a2e5fc4ec63f16b4c6702809b6 (patch) | |
tree | 669e5b6dbbab7092176c3e2759f0712d3fe4d9d5 /net/bridge | |
parent | 7afcaec4969652e177cf0b247a1530ac927a20f8 (diff) |
bridge: Don't include NDA_VLAN for FDB entries with vid 0
An FDB entry with vlan_id 0 doesn't mean it is used in vlan 0, but used when
vlan_filtering is disabled.
There is inconsistency around NDA_VLAN whose payload is 0 - even if we add
an entry by RTM_NEWNEIGH without any NDA_VLAN, and even though adding an
entry with NDA_VLAN 0 is prohibited, we get an entry with NDA_VLAN 0 by
RTM_GETNEIGH.
Dumping an FDB entry with vlan_id 0 shouldn't include NDA_VLAN.
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_fdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index b524c36c1273..02359e81f86e 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -631,7 +631,7 @@ static int fdb_fill_info(struct sk_buff *skb, const struct net_bridge *br, | |||
631 | if (nla_put(skb, NDA_CACHEINFO, sizeof(ci), &ci)) | 631 | if (nla_put(skb, NDA_CACHEINFO, sizeof(ci), &ci)) |
632 | goto nla_put_failure; | 632 | goto nla_put_failure; |
633 | 633 | ||
634 | if (nla_put(skb, NDA_VLAN, sizeof(u16), &fdb->vlan_id)) | 634 | if (fdb->vlan_id && nla_put(skb, NDA_VLAN, sizeof(u16), &fdb->vlan_id)) |
635 | goto nla_put_failure; | 635 | goto nla_put_failure; |
636 | 636 | ||
637 | return nlmsg_end(skb, nlh); | 637 | return nlmsg_end(skb, nlh); |