diff src/route.c @ 5535:a0d828e25482 draft

Add --noconfigure option With this set dhcpcd will not configure anything on the host. The expectation is that a 3rd party script will instead.
author Roy Marples <roy@marples.name>
date Wed, 04 Nov 2020 14:18:48 +0000
parents 30603cb789ea
children ddb1318a21e8
line wrap: on
line diff
--- a/src/route.c	Wed Nov 04 11:31:40 2020 +1300
+++ b/src/route.c	Wed Nov 04 14:18:48 2020 +0000
@@ -713,6 +713,9 @@
 #endif
 
 	RB_TREE_FOREACH_SAFE(rt, &routes, rtn) {
+		if (rt->rt_ifp && rt->rt_ifp->options &&
+		    !(rt->rt_ifp->options->options & DHCPCD_CONFIGURE))
+			continue;
 #ifdef BSD
 		if (rt_is_default(rt) &&
 		    if_missfilter(rt->rt_ifp, &rt->rt_gateway) == -1)
@@ -771,7 +774,6 @@
 		}
 	}
 
-
 getfail:
 	rt_headclear(&routes, AF_UNSPEC);
 	rt_headclear(&kroutes, AF_UNSPEC);