diff options
author | Susant Sahani <ssahani@users.noreply.github.com> | 2016-04-21 06:06:33 +0530 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-20 20:36:33 -0400 |
commit | 964b26fe2127d28713bccf03603900a7691216ba (patch) | |
tree | 3f4164333b26c5552ba15e7056cc95bc7f037822 /src/network/networkd-dhcp4.c | |
parent | 439689c6ec48faba67565562d75701d5736567e7 (diff) |
networkd: respect DHCP UseRoutes option (#3075)
This fixes #2282.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r-- | src/network/networkd-dhcp4.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 0589ebf227..c5b61abc9e 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -57,6 +57,10 @@ static int link_set_dhcp_routes(Link *link) { assert(link); assert(link->dhcp_lease); + assert(link->network); + + if (!link->network->dhcp_use_routes) + return 0; r = sd_dhcp_lease_get_router(link->dhcp_lease, &gateway); if (r < 0 && r != -ENODATA) |