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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1434451129-3241-4-git-send-email-razor@blackwall.org>
Date:	Tue, 16 Jun 2015 13:38:49 +0300
From:	Nikolay Aleksandrov <razor@...ckwall.org>
To:	netdev@...r.kernel.org
Cc:	stephen@...workplumber.org, joerg@...gsboson.tk,
	davem@...emloft.net, Nikolay Aleksandrov <razor@...ckwall.org>
Subject: [PATCH iproute2 net-next 3/3] iplink_bridge: add support for priority

This patch adds support to set bridge stp priority via IFLA_BR_PRIORITY.

Signed-off-by: Nikolay Aleksandrov <razor@...ckwall.org>
---
 ip/iplink_bridge.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index 79b9e049ff92..297160c490fd 100644
--- a/ip/iplink_bridge.c
+++ b/ip/iplink_bridge.c
@@ -25,6 +25,7 @@ static void explain(void)
 		"                  [ max_age MAX_AGE ]\n"
 		"                  [ ageing_time AGEING_TIME ]\n"
 		"                  [ stp_state STP_STATE ]\n"
+		"                  [ priority PRIORITY ]\n"
 	);
 }
 
@@ -69,6 +70,15 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
 				return -1;
 			}
 			addattr32(n, 1024, IFLA_BR_STP_STATE, val);
+		} else if (matches(*argv, "priority") == 0) {
+			__u16 prio;
+
+			NEXT_ARG();
+			if (get_u16(&prio, *argv, 0)) {
+				invarg("invalid priority", *argv);
+				return -1;
+			}
+			addattr16(n, 1024, IFLA_BR_PRIORITY, prio);
 		} else if (matches(*argv, "help") == 0) {
 			explain();
 			return -1;
-- 
2.4.3

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