diff options
Diffstat (limited to 'usr.sbin/rtadvd/config.c')
-rw-r--r-- | usr.sbin/rtadvd/config.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index f78c29d..e6411ed 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -185,6 +185,12 @@ getconfig(char *intface) if ((forwarding = getinet6sysctl(IPV6CTL_FORWARDING)) < 0) exit(1); + /* gather on-link prefixes from the kernel or not. */ + if (agetflag("noonlinkprefix")) + rai->rai_advonlinkprefix = 0; + else + rai->rai_advonlinkprefix = 1; + /* get interface information */ if (agetflag("nolladdr")) rai->rai_advlinkopt = 0; @@ -433,7 +439,7 @@ getconfig(char *intface) now.tv_sec + pfx->pfx_preflifetime; } } - if (rai->rai_pfxs == 0) + if (rai->rai_advonlinkprefix && rai->rai_pfxs == 0) get_prefix(rai); MAYHAVE(val, "mtu", 0); |