naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/0040-bridge-link-add-support-to-specify-master.patch

4aca6e
From 9bcdaa1cecfa37d2213f9dd443d0c4c21a8e4b21 Mon Sep 17 00:00:00 2001
4aca6e
From: Phil Sutter <psutter@redhat.com>
4aca6e
Date: Tue, 28 Feb 2017 16:10:15 +0100
4aca6e
Subject: [PATCH] bridge link: add support to specify master
4aca6e
4aca6e
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1417289
4aca6e
Upstream Status: iproute2.git commit 22a98f5140373
4aca6e
4aca6e
commit 22a98f5140373198ea2a5ca721fea937c6f7b509
4aca6e
Author: Roopa Prabhu <roopa@cumulusnetworks.com>
4aca6e
Date:   Thu Feb 26 00:12:59 2015 -0800
4aca6e
4aca6e
    bridge link: add support to specify master
4aca6e
4aca6e
    This patch adds support to specify 'master' keyword,
4aca6e
    to target a bridge link command explicitly to the software
4aca6e
    bridge driver.
4aca6e
4aca6e
    Adds self/master keywords to usage and man page
4aca6e
4aca6e
    v2:
4aca6e
            fix usage to say (self and master) and not (self or master)
4aca6e
4aca6e
    Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
4aca6e
---
4aca6e
 bridge/link.c     |  5 ++++-
4aca6e
 man/man8/bridge.8 | 12 +++++++++++-
4aca6e
 2 files changed, 15 insertions(+), 2 deletions(-)
4aca6e
4aca6e
diff --git a/bridge/link.c b/bridge/link.c
4aca6e
index 06a2c0f..69c0bfb 100644
4aca6e
--- a/bridge/link.c
4aca6e
+++ b/bridge/link.c
4aca6e
@@ -227,6 +227,7 @@ static void usage(void)
4aca6e
 	fprintf(stderr,	"                               [ learning_sync {on | off} ]\n");
4aca6e
 	fprintf(stderr,	"                               [ flood {on | off} ]\n");
4aca6e
 	fprintf(stderr, "                               [ hwmode {vepa | veb} ]\n");
4aca6e
+	fprintf(stderr, "                               [ self ] [ master ]\n");
4aca6e
 	fprintf(stderr, "       bridge link show [dev DEV]\n");
4aca6e
 	exit(-1);
4aca6e
 }
4aca6e
@@ -343,7 +344,9 @@ static int brlink_modify(int argc, char **argv)
4aca6e
 				exit(-1);
4aca6e
 			}
4aca6e
 		} else if (strcmp(*argv, "self") == 0) {
4aca6e
-			flags = BRIDGE_FLAGS_SELF;
4aca6e
+			flags |= BRIDGE_FLAGS_SELF;
4aca6e
+		} else if (strcmp(*argv, "master") == 0) {
4aca6e
+			flags |= BRIDGE_FLAGS_MASTER;
4aca6e
 		} else {
4aca6e
 			usage();
4aca6e
 		}
4aca6e
diff --git a/man/man8/bridge.8 b/man/man8/bridge.8
4aca6e
index c742c83..8fae74b 100644
4aca6e
--- a/man/man8/bridge.8
4aca6e
+++ b/man/man8/bridge.8
4aca6e
@@ -40,7 +40,8 @@ bridge \- show / manipulate bridge addresses and devices
4aca6e
 .BR learning " { " on " | " off " } ] [ "
4aca6e
 .BR learning_sync " { " on " | " off " } ] [ "
4aca6e
 .BR flood " { " on " | " off " } ] [ "
4aca6e
-.BR hwmode " { " vepa " | " veb " } ] "
4aca6e
+.BR hwmode " { " vepa " | " veb " } ] [ "
4aca6e
+.BR self " ]  [ " master " ] "
4aca6e
 
4aca6e
 .ti -8
4aca6e
 .BR "bridge link" " [ " show " ] [ "
4aca6e
@@ -286,6 +287,15 @@ switch.
4aca6e
 .B veb
4aca6e
 - bridging happens in hardware.
4aca6e
 
4aca6e
+.TP
4aca6e
+.BI self
4aca6e
+link setting is configured on specified physical device
4aca6e
+
4aca6e
+.TP
4aca6e
+.BI master
4aca6e
+link setting is configured on the software bridge (default)
4aca6e
+
4aca6e
+
4aca6e
 .SS bridge link show - list bridge port configuration.
4aca6e
 
4aca6e
 This command displays the current bridge port configuration and flags.
4aca6e
-- 
4aca6e
1.8.3.1
4aca6e