]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: bridge allow AgeingTimeSec to be set 0 (#7021)
authorSusant Sahani <145210+ssahani@users.noreply.github.com>
Wed, 11 Oct 2017 07:08:05 +0000 (12:38 +0530)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 11 Oct 2017 07:08:05 +0000 (09:08 +0200)
Closes #7019.

src/network/netdev/bridge.c

index 16fff78bf8ea8a23eafbcf980be5369bed2c0d9f..17c3955ef5e131a1b32802fb6a960c89d2c43c38 100644 (file)
@@ -91,7 +91,7 @@ static int netdev_bridge_post_create(NetDev *netdev, Link *link, sd_netlink_mess
                         return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_MAX_AGE attribute: %m");
         }
 
-        if (b->ageing_time > 0) {
+        if (b->ageing_time != USEC_INFINITY) {
                 r = sd_netlink_message_append_u32(req, IFLA_BR_AGEING_TIME, usec_to_jiffies(b->ageing_time));
                 if (r < 0)
                         return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_AGEING_TIME attribute: %m");
@@ -169,6 +169,7 @@ static void bridge_init(NetDev *n) {
         b->stp = -1;
         b->default_pvid = VLANID_INVALID;
         b->forward_delay = USEC_INFINITY;
+        b->ageing_time = USEC_INFINITY;
 }
 
 const NetDevVTable bridge_vtable = {