aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2019-08-17 07:22:10 -0400
committerDavid S. Miller <davem@davemloft.net>2019-08-17 15:36:56 -0400
commitf59783f5bb1ac6c59d4ba35430df1b89caeadab1 (patch)
treeb7546f6f9f0d57fbdc60dcb38b79039b9855d19d /net
parent59d0f749bf3e6fea1ba3f9860ccf8b9ae7b3bb0e (diff)
net: bridge: mdb: move vlan comments
Trivial patch to move the vlan comments in their proper places above the vid 0 checks. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_mdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
index 428af1abf8cc..ee6208c6d946 100644
--- a/net/bridge/br_mdb.c
+++ b/net/bridge/br_mdb.c
@@ -653,9 +653,6 @@ static int br_mdb_add(struct sk_buff *skb, struct nlmsghdr *nlh,
653 653
654 br = netdev_priv(dev); 654 br = netdev_priv(dev);
655 655
656 /* If vlan filtering is enabled and VLAN is not specified
657 * install mdb entry on all vlans configured on the port.
658 */
659 pdev = __dev_get_by_index(net, entry->ifindex); 656 pdev = __dev_get_by_index(net, entry->ifindex);
660 if (!pdev) 657 if (!pdev)
661 return -ENODEV; 658 return -ENODEV;
@@ -665,6 +662,9 @@ static int br_mdb_add(struct sk_buff *skb, struct nlmsghdr *nlh,
665 return -EINVAL; 662 return -EINVAL;
666 663
667 vg = nbp_vlan_group(p); 664 vg = nbp_vlan_group(p);
665 /* If vlan filtering is enabled and VLAN is not specified
666 * install mdb entry on all vlans configured on the port.
667 */
668 if (br_vlan_enabled(br->dev) && vg && entry->vid == 0) { 668 if (br_vlan_enabled(br->dev) && vg && entry->vid == 0) {
669 list_for_each_entry(v, &vg->vlan_list, vlist) { 669 list_for_each_entry(v, &vg->vlan_list, vlist) {
670 entry->vid = v->vid; 670 entry->vid = v->vid;
@@ -745,9 +745,6 @@ static int br_mdb_del(struct sk_buff *skb, struct nlmsghdr *nlh,
745 745
746 br = netdev_priv(dev); 746 br = netdev_priv(dev);
747 747
748 /* If vlan filtering is enabled and VLAN is not specified
749 * delete mdb entry on all vlans configured on the port.
750 */
751 pdev = __dev_get_by_index(net, entry->ifindex); 748 pdev = __dev_get_by_index(net, entry->ifindex);
752 if (!pdev) 749 if (!pdev)
753 return -ENODEV; 750 return -ENODEV;
@@ -757,6 +754,9 @@ static int br_mdb_del(struct sk_buff *skb, struct nlmsghdr *nlh,
757 return -EINVAL; 754 return -EINVAL;
758 755
759 vg = nbp_vlan_group(p); 756 vg = nbp_vlan_group(p);
757 /* If vlan filtering is enabled and VLAN is not specified
758 * delete mdb entry on all vlans configured on the port.
759 */
760 if (br_vlan_enabled(br->dev) && vg && entry->vid == 0) { 760 if (br_vlan_enabled(br->dev) && vg && entry->vid == 0) {
761 list_for_each_entry(v, &vg->vlan_list, vlist) { 761 list_for_each_entry(v, &vg->vlan_list, vlist) {
762 entry->vid = v->vid; 762 entry->vid = v->vid;