Mercurial > hg > dhcpcd
changeset 5356:39a8d5dfe695 draft
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.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Mon, 15 Jun 2020 09:49:34 +0100 |
| parents | 6c3a684c5a67 |
| children | 2ddfb6841ebb |
| files | src/if-bsd.c src/if-sun.c |
| diffstat | 2 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/if-bsd.c Sun Jun 14 15:26:59 2020 +0100 +++ b/src/if-bsd.c Mon Jun 15 09:49:34 2020 +0100 @@ -727,9 +727,7 @@ } 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) {
--- a/src/if-sun.c Sun Jun 14 15:26:59 2020 +0100 +++ b/src/if-sun.c Mon Jun 15 09:49:34 2020 +0100 @@ -594,9 +594,7 @@ else if (!gateway_unspec) 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) {
