diff options
Diffstat (limited to 'interface-ip.c')
-rw-r--r-- | interface-ip.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/interface-ip.c b/interface-ip.c index ea4c3dd..56f8bd9 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -456,8 +456,13 @@ interface_set_prefix_address(struct interface *iface, bool add, addr.valid_until = assignment->prefix->valid_until; if (!add) { - if (assignment->enabled) - system_del_address(l3_downlink, &addr); + if (assignment->enabled) { + time_t now = system_get_rtime(); + addr.preferred_until = now; + if (addr.valid_until - now > 7200) + addr.valid_until = now + 7200; + system_add_address(l3_downlink, &addr); + } } else { system_add_address(l3_downlink, &addr); |