|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
From c37f094c79877bea56b929b74b4e5c8df05f2eda Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
From: Susant Sahani <145210+ssahani@users.noreply.github.com>
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
Date: Wed, 11 Oct 2017 12:38:05 +0530
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
Subject: [PATCH] networkd: bridge allow AgeingTimeSec to be set 0 (#7021)
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
Closes #7019.
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
(cherry picked from commit 0da812036f6fd60a7b5477fafb2eead9e98f4c78)
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
src/network/netdev/bridge.c | 3 ++-
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
index 16fff78bf8..17c3955ef5 100644
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
--- a/src/network/netdev/bridge.c
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
+++ b/src/network/netdev/bridge.c
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
@@ -91,7 +91,7 @@ static int netdev_bridge_post_create(NetDev *netdev, Link *link, sd_netlink_mess
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_MAX_AGE attribute: %m");
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
- if (b->ageing_time > 0) {
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
+ if (b->ageing_time != USEC_INFINITY) {
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
r = sd_netlink_message_append_u32(req, IFLA_BR_AGEING_TIME, usec_to_jiffies(b->ageing_time));
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_AGEING_TIME attribute: %m");
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
@@ -169,6 +169,7 @@ static void bridge_init(NetDev *n) {
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
b->stp = -1;
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
b->default_pvid = VLANID_INVALID;
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
b->forward_delay = USEC_INFINITY;
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
+ b->ageing_time = USEC_INFINITY;
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
const NetDevVTable bridge_vtable = {
|