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]
Message-Id: <1335775148-5191-1-git-send-email-Joakim.Tjernlund@transmode.se>
Date:	Mon, 30 Apr 2012 10:39:08 +0200
From:	Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>
To:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc:	Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>
Subject: [PATCH] bridge: make brctl showstp display port id

My brctl showstp br0 always shows a 0 port id:
eth2 (1)
 port id		0			state		       disabled
 designated root	8000.00069c00b2fb	path cost		 100

because port id is printed as a hex number in sys fs. Change the
two hex occurrences(port no and port id) to decimal, just like all
the other numbers in this area.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>
---
 net/bridge/br_sysfs_if.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c
index fd5799c..9c4c2eb 100644
--- a/net/bridge/br_sysfs_if.c
+++ b/net/bridge/br_sysfs_if.c
@@ -86,13 +86,13 @@ static BRPORT_ATTR(designated_cost, S_IRUGO, show_designated_cost, NULL);
 
 static ssize_t show_port_id(struct net_bridge_port *p, char *buf)
 {
-	return sprintf(buf, "0x%x\n", p->port_id);
+	return sprintf(buf, "%d\n", p->port_id);
 }
 static BRPORT_ATTR(port_id, S_IRUGO, show_port_id, NULL);
 
 static ssize_t show_port_no(struct net_bridge_port *p, char *buf)
 {
-	return sprintf(buf, "0x%x\n", p->port_no);
+	return sprintf(buf, "%d\n", p->port_no);
 }
 
 static BRPORT_ATTR(port_no, S_IRUGO, show_port_no, NULL);
-- 
1.7.3.4

--
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