]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
bridge link: add support to specify master
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Thu, 26 Feb 2015 08:12:59 +0000 (00:12 -0800)
committerStephen Hemminger <shemming@brocade.com>
Sat, 28 Feb 2015 02:58:04 +0000 (18:58 -0800)
This patch adds support to specify 'master' keyword,
to target a bridge link command explicitly to the software
bridge driver.

Adds self/master keywords to usage and man page

v2:
fix usage to say (self and master) and not (self or master)

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
bridge/link.c
man/man8/bridge.8

index a7bd85f9d3b57463943856e81ef949d47474c294..aa40692d28edac2afe9fb04182697614b3ded3c8 100644 (file)
@@ -227,6 +227,7 @@ static void usage(void)
        fprintf(stderr, "                               [ learning_sync {on | off} ]\n");
        fprintf(stderr, "                               [ flood {on | off} ]\n");
        fprintf(stderr, "                               [ hwmode {vepa | veb} ]\n");
+       fprintf(stderr, "                               [ self ] [ master ]\n");
        fprintf(stderr, "       bridge link show [dev DEV]\n");
        exit(-1);
 }
@@ -343,7 +344,9 @@ static int brlink_modify(int argc, char **argv)
                                exit(-1);
                        }
                } else if (strcmp(*argv, "self") == 0) {
-                       flags = BRIDGE_FLAGS_SELF;
+                       flags |= BRIDGE_FLAGS_SELF;
+               } else if (strcmp(*argv, "master") == 0) {
+                       flags |= BRIDGE_FLAGS_MASTER;
                } else {
                        usage();
                }
index 68ad71e5d8b4675591ac7cf971f5b4122d558aee..2005b9f07448f8924cf7d2bac65128d34e47e4db 100644 (file)
@@ -40,7 +40,8 @@ bridge \- show / manipulate bridge addresses and devices
 .BR learning " { " on " | " off " } ] [ "
 .BR learning_sync " { " on " | " off " } ] [ "
 .BR flood " { " on " | " off " } ] [ "
-.BR hwmode " { " vepa " | " veb " } ] "
+.BR hwmode " { " vepa " | " veb " } ] [ "
+.BR self " ]  [ " master " ] "
 
 .ti -8
 .BR "bridge link" " [ " show " ] [ "
@@ -286,6 +287,15 @@ switch.
 .B veb
 - bridging happens in hardware.
 
+.TP
+.BI self
+link setting is configured on specified physical device
+
+.TP
+.BI master
+link setting is configured on the software bridge (default)
+
+
 .SS bridge link show - list bridge port configuration.
 
 This command displays the current bridge port configuration and flags.