Displaying 5 results from an estimated 5 matches for "br_cmd_stp".
2007 Apr 18
0
[Bridge] [PATCH] Crash on "brctl stp br0"
...-------
--- brctl/brctl_cmd.c
+++ brctl/brctl_cmd.c
@@ -394,7 +394,7 @@ static const struct command commands[] =
 	  "<bridge>\t\tshow a list of mac addrs"},
 	{ 1, "showstp", br_cmd_showstp, 
 	  "<bridge>\t\tshow bridge stp info"},
-	{ 1, "stp", br_cmd_stp,
+	{ 2, "stp", br_cmd_stp,
 	  "<bridge> <state>\tturn stp on/off" },
 };
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...(param, "on") || !strcmp(param, "yes")
+	    || !strcmp(param, "1"))
+		*res = 1;
+	else if (!strcmp(param, "off") || !strcmp(param, "no")
+		 || !strcmp(param, "0"))
+		*res = 0;
+	else {
+		return EINVAL;
+	}
+	return 0;
+}
+
 static int br_cmd_stp(int argc, char *const* argv)
 {
 	int stp, err;
 
-	if (!strcmp(argv[2], "on") || !strcmp(argv[2], "yes") 
-	    || !strcmp(argv[2], "1"))
-		stp = 1;
-	else if (!strcmp(argv[2], "off") || !strcmp(argv[2], "no") 
-		 || !strcmp(argv[2], "0"...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...(param, "on") || !strcmp(param, "yes")
+	    || !strcmp(param, "1"))
+		*res = 1;
+	else if (!strcmp(param, "off") || !strcmp(param, "no")
+		 || !strcmp(param, "0"))
+		*res = 0;
+	else {
+		return EINVAL;
+	}
+	return 0;
+}
+
 static int br_cmd_stp(int argc, char *const* argv)
 {
 	int stp, err;
 
-	if (!strcmp(argv[2], "on") || !strcmp(argv[2], "yes") 
-	    || !strcmp(argv[2], "1"))
-		stp = 1;
-	else if (!strcmp(argv[2], "off") || !strcmp(argv[2], "no") 
-		 || !strcmp(argv[2], "0"...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...(param, "on") || !strcmp(param, "yes")
+	    || !strcmp(param, "1"))
+		*res = 1;
+	else if (!strcmp(param, "off") || !strcmp(param, "no")
+		 || !strcmp(param, "0"))
+		*res = 0;
+	else {
+		return EINVAL;
+	}
+	return 0;
+}
+
 static int br_cmd_stp(int argc, char *const* argv)
 {
 	int stp, err;
 
-	if (!strcmp(argv[2], "on") || !strcmp(argv[2], "yes") 
-	    || !strcmp(argv[2], "1"))
-		stp = 1;
-	else if (!strcmp(argv[2], "off") || !strcmp(argv[2], "no") 
-		 || !strcmp(argv[2], "0"...
2007 Apr 18
5
[Bridge] RFC: [PATCH] bridge vlan integration
Hi,
The attached patches enables the bridge to filter and forward packets
according to their IEEE 802.1q headers.  The goals behind this change
include :
- Enable running STP on 802.1q tagged networks.  STP packets
  must be untagged.  It isn't obvious how else to enable STP
  with the current bridge and vlan code.
- Add native support for an untagged vlan.  Currently an untagged
  vlan can