summaryrefslogtreecommitdiffstats
path: root/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-08-25 10:22:48 +0000
committerRoy Marples <roy@marples.name>2013-08-25 10:22:48 +0000
commit15fc1181d54a92fd48427c77fb3615a39774511a (patch)
tree707db2512aebda7d2fe5bc2de9d12d6382688358 /ipv6.c
parent68662728f75d9cd530c064420e9f9ee13d731325 (diff)
downloaddhcpcd-15fc1181d54a92fd48427c77fb3615a39774511a.tar.xz
Fix the persistent option.
Diffstat (limited to 'ipv6.c')
-rw-r--r--ipv6.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ipv6.c b/ipv6.c
index 84e3e156..19da0ab3 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -457,7 +457,10 @@ ipv6_freedrop_addrs(struct ipv6_addrhead *addrs, int drop,
* This is safe because the RA is removed from the list
* before we are called. */
if (drop && ap->flags & IPV6_AF_ADDED &&
- !ipv6nd_addrexists(ap) && !dhcp6_addrexists(ap))
+ !ipv6nd_addrexists(ap) && !dhcp6_addrexists(ap) &&
+ (ap->iface->options->options &
+ (DHCPCD_EXITING | DHCPCD_PERSISTENT)) !=
+ (DHCPCD_EXITING | DHCPCD_PERSISTENT))
{
syslog(LOG_INFO, "%s: deleting address %s",
ap->iface->name, ap->saddr);
@@ -1026,7 +1029,9 @@ ipv6_buildroutes(void)
/* no need to add it back to our routing table
* as we delete an exiting route when we add
* a new one */
- else
+ else if ((rt->iface->options->options &
+ (DHCPCD_EXITING | DHCPCD_PERSISTENT)) !=
+ (DHCPCD_EXITING | DHCPCD_PERSISTENT))
d_route(rt);
}
free(rt);