]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Force gatetway to zero instead of adding a host route when the interface
authorRoy Marples <roy@marples.name>
Mon, 19 Apr 2010 11:16:43 +0000 (11:16 +0000)
committerRoy Marples <roy@marples.name>
Mon, 19 Apr 2010 11:16:43 +0000 (11:16 +0000)
does not support ARP. This improves performance slighty.
Addresses #188.

configure.c

index 6ab86bd84bb25d91d16c29f9836fc30abf7cbbc5..2d320d5874fe723b401df5b57907b1e88b6b0471 100644 (file)
@@ -597,8 +597,15 @@ add_router_host_route(struct rt *rt, const struct interface *ifp)
                }
                if (rtn != rtp)
                        continue;
+               if (ifp->flags & IFF_NOARP) {
+                       syslog(LOG_WARNING,
+                           "%s: forcing router %s through interface",
+                           ifp->name, inet_ntoa(rtp->gate));
+                       rtp->gate.s_addr = 0;
+                       continue;
+               }
                syslog(LOG_WARNING, "%s: router %s requires a host route",
-                      ifp->name, inet_ntoa(rtp->gate));
+                   ifp->name, inet_ntoa(rtp->gate));
                rtn = xmalloc(sizeof(*rtn));
                rtn->dest.s_addr = rtp->gate.s_addr;
                rtn->net.s_addr = INADDR_BROADCAST;