From: Susant Sahani Date: Thu, 21 Apr 2016 00:36:33 +0000 (+0530) Subject: networkd: respect DHCP UseRoutes option (#3075) X-Git-Tag: v231~426 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=964b26fe2127d28713bccf03603900a7691216ba;p=platform%2Fupstream%2Fsystemd.git networkd: respect DHCP UseRoutes option (#3075) This fixes #2282. --- diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 0589ebf..c5b61ab 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)