summaryrefslogtreecommitdiff
path: root/src/network/netdev
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@users.noreply.github.com>2016-11-30 16:24:42 +0530
committerLennart Poettering <lennart@poettering.net>2016-11-30 11:54:42 +0100
commit730389b6dc0c601884781da319086e89da5be378 (patch)
treeeb6fd13357ebfd5872c0dd56cb697b575f108419 /src/network/netdev
parentcd108a83d9b7bbbf77ba2849707678e89aeb89a8 (diff)
As per use case we should allow ForwardDelaySec to be set as 0 (#4765)
So let's set ForwardDelaySec to USEC_INFINITY . Reference: https://wiki.linuxfoundation.org/networking/bridge#does-dhcp-work-overthrough-a-bridge
Diffstat (limited to 'src/network/netdev')
-rw-r--r--src/network/netdev/bridge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
index 08e31b974f..9fdcb55376 100644
--- a/src/network/netdev/bridge.c
+++ b/src/network/netdev/bridge.c
@@ -72,7 +72,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_INFO_DATA attribute: %m");
/* convert to jiffes */
- if (b->forward_delay > 0) {
+ if (b->forward_delay != USEC_INFINITY) {
r = sd_netlink_message_append_u32(req, IFLA_BR_FORWARD_DELAY, usec_to_jiffies(b->forward_delay));
if (r < 0)
return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_FORWARD_DELAY attribute: %m");
@@ -160,6 +160,7 @@ static void bridge_init(NetDev *n) {
b->mcast_snooping = -1;
b->vlan_filtering = -1;
b->stp = -1;
+ b->forward_delay = USEC_INFINITY;
}
const NetDevVTable bridge_vtable = {