[Bridge] [PATCH] Crash on "brctl stp br0"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

"brctl stp br0" would crash brctl provided that br0 is a bridge.  This is 
caused by incorrect number of arguments in the commands table. "stp" needs 
at least 2 arguments after "stp".  The patch against version 1.0.4 is 
attached.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- 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" },
 };
 

[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux