From: Roy Marples Date: Thu, 23 Aug 2012 08:39:16 +0000 (+0000) Subject: Only add our own host or destination routes to the build table when X-Git-Tag: v5.6.2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bf4099757b246b652367b3384cfd8e6acfe0544;p=thirdparty%2Fdhcpcd.git Only add our own host or destination routes to the build table when we are adding gateways. Thanks to Nazarov Yuriy Pavlovich. --- diff --git a/configure.c b/configure.c index d8aefd77..8003507a 100644 --- a/configure.c +++ b/configure.c @@ -695,8 +695,10 @@ build_routes(void) dnr = get_routes(ifp); dnr = massage_host_routes(dnr, ifp); dnr = add_subnet_route(dnr, ifp); - dnr = add_router_host_route(dnr, ifp); - dnr = add_destination_route(dnr, ifp); + if (ifp->state->options->options & DHCPCD_GATEWAY) { + dnr = add_router_host_route(dnr, ifp); + dnr = add_destination_route(dnr, ifp); + } for (rt = dnr; rt && (rtn = rt->next, 1); lrt = rt, rt = rtn) { rt->iface = ifp; rt->metric = ifp->metric;