Commit 6c99fb60 authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by Stephen Hemminger

iplink_bridge: add support for ageing_time

This patch adds support to set ageing_time via IFLA_BR_AGEING_TIME.
Signed-off-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
parent 7d6bc3b8
...@@ -23,6 +23,7 @@ static void explain(void) ...@@ -23,6 +23,7 @@ static void explain(void)
"Usage: ... bridge [ forward_delay FORWARD_DELAY ]\n" "Usage: ... bridge [ forward_delay FORWARD_DELAY ]\n"
" [ hello_time HELLO_TIME ]\n" " [ hello_time HELLO_TIME ]\n"
" [ max_age MAX_AGE ]\n" " [ max_age MAX_AGE ]\n"
" [ ageing_time AGEING_TIME ]\n"
); );
} }
...@@ -53,6 +54,13 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv, ...@@ -53,6 +54,13 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
return -1; return -1;
} }
addattr32(n, 1024, IFLA_BR_MAX_AGE, val); addattr32(n, 1024, IFLA_BR_MAX_AGE, val);
} else if (matches(*argv, "ageing_time") == 0) {
NEXT_ARG();
if (get_u32(&val, *argv, 0)) {
invarg("invalid ageing_time", *argv);
return -1;
}
addattr32(n, 1024, IFLA_BR_AGEING_TIME, val);
} else if (matches(*argv, "help") == 0) { } else if (matches(*argv, "help") == 0) {
explain(); explain();
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment