lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Jan 2011 18:29:16 +0300
From:	Anton Danilov <littlesmilingcloud@...il.com>
To:	netdev@...r.kernel.org
Subject: [patch] bridge-utils: show selected bridge

diff --git a/brctl/brctl_cmd.c b/brctl/brctl_cmd.c
index d37e99c..d95fe54 100644
--- a/brctl/brctl_cmd.c
+++ b/brctl/brctl_cmd.c
@@ -338,8 +338,14 @@ static int show_bridge(const char *name, void *arg)

 static int br_cmd_show(int argc, char *const* argv)
 {
+       int i = 0;
+
        printf("bridge name\tbridge id\t\tSTP enabled\tinterfaces\n");
-       br_foreach_bridge(show_bridge, NULL);
+       if (argc == 1)
+               br_foreach_bridge(show_bridge, NULL);
+       else
+               for(i = 2; i <= argc; i++)
+                       show_bridge(argv[i - 1], NULL);
        return 0;
 }

@@ -454,7 +460,8 @@ static const struct command commands[] = {
          "<bridge> <port> <cost>\tset path cost" },
        { 3, "setportprio", br_cmd_setportprio,
          "<bridge> <port> <prio>\tset port priority" },
-       { 0, "show", br_cmd_show, "\t\t\tshow a list of bridges" },
+       { 0, "show", br_cmd_show,
+         "[ <bridge> ]\t\tshow a list of bridges" },
        { 1, "showmacs", br_cmd_showmacs,
          "<bridge>\t\tshow a list of mac addrs"},
        { 1, "showstp", br_cmd_showstp,
-- 
Anton.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ