From 301a2fb99acf8b3484bd295e835983b1ad09bf48 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Fri, 16 Jun 2017 09:07:13 +0300 Subject: [PATCH] networkd: Fix comment Comment about not being a router is in the wrong place. Router lifetime is assigned with config_parse_sec(). --- src/network/networkd-address.c | 3 +-- src/network/networkd-radv.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index de918c3c29..badc47af05 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -1166,8 +1166,7 @@ int config_parse_prefix_lifetime(const char *unit, return 0; } - /* a value of 0xffffffff represents infinity, 0x0 means this host is - not a router */ + /* a value of 0xffffffff represents infinity */ if (streq(lvalue, "PreferredLifetimeSec")) r = sd_radv_prefix_set_preferred_lifetime(p->radv_prefix, (usec + USEC_PER_SEC - 1) / USEC_PER_SEC); diff --git a/src/network/networkd-radv.c b/src/network/networkd-radv.c index e5be145146..cdcb8c7717 100644 --- a/src/network/networkd-radv.c +++ b/src/network/networkd-radv.c @@ -55,6 +55,8 @@ int radv_configure(Link *link) { if (r < 0) return r; + /* a value of 0xffffffff represents infinity, 0x0 means this host is + not a router */ r = sd_radv_set_router_lifetime(link->radv, link->network->router_lifetime_usec); if (r < 0)