summaryrefslogtreecommitdiffstats
path: root/src/if-bsd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-06-15 09:49:34 +0100
committerRoy Marples <roy@marples.name>2020-06-15 09:49:34 +0100
commitdb2e7690c98a3e4c70c71ebfd48e16dc0949daaf (patch)
tree7201a5d18e0afbbe5a17e8b4055c8368012336d4 /src/if-bsd.c
parent985013937decf0a80992b6f0c30fcd336fb9d597 (diff)
downloaddhcpcd-db2e7690c98a3e4c70c71ebfd48e16dc0949daaf.tar.xz
BSD: Mark routes as static only from static config
Rather than if genered by an address. This allows RA prefix routes without an address to be non static, so you could derive whether a route came from something autoconf or not.
Diffstat (limited to 'src/if-bsd.c')
-rw-r--r--src/if-bsd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/if-bsd.c b/src/if-bsd.c
index 68516052..b1001715 100644
--- a/src/if-bsd.c
+++ b/src/if-bsd.c
@@ -727,9 +727,7 @@ if_route(unsigned char cmd, const struct rt *rt)
} else
rtm->rtm_flags |= RTF_GATEWAY;
- /* Emulate the kernel by marking address generated
- * network routes non-static. */
- if (!(rt->rt_dflags & RTDF_IFA_ROUTE))
+ if (rt->rt_dflags & RTDF_STATIC)
rtm->rtm_flags |= RTF_STATIC;
if (rt->rt_mtu != 0) {