diff options
| author | Roy Marples <roy@marples.name> | 2015-05-01 15:52:34 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2015-05-01 15:52:34 +0000 |
| commit | 2f53bfd408f7c26fbe73febf466ec3bfe8bbdf61 (patch) | |
| tree | efa6dbb3cbf557bea6cb1a4c92ffc3f0c85d433f /dhcpcd.c | |
| parent | 26e5154f95c08a5e0a6d2e8863ae2d03c2f46e46 (diff) | |
| download | dhcpcd-2f53bfd408f7c26fbe73febf466ec3bfe8bbdf61.tar.xz | |
On carrier down, rebuild routes and expire RA's if keeping IP addressses.
On carrier up, set RA's to expire comletely after a few seconds.
If no valid RA's are available, kill DHCPv6.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -640,6 +640,8 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx *ctx, int carrier, unsigned int flags, script_runreason(ifp, "NOCARRIER"); #ifdef NOCARRIER_PRESERVE_IP arp_close(ifp); + ipv4_buildroutes(ifp->ctx); + ipv6nd_expire(ifp, 0); #else dhcpcd_drop(ifp, 0); #endif @@ -671,6 +673,12 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx *ctx, int carrier, unsigned int flags, } dhcpcd_initstate(ifp, 0); script_runreason(ifp, "CARRIER"); +#ifdef NOCARRIER_PRESERVE_IP + /* Set any IPv6 Routers we remembered to expire + * faster than they would normally as we + * maybe on a new network. */ + ipv6nd_expire(ifp, RTR_CARRIER_EXPIRE); +#endif /* RFC4941 Section 3.5 */ if (ifp->options->options & DHCPCD_IPV6RA_OWN) ipv6_gentempifid(ifp); |
