diff options
| author | Roy Marples <roy@marples.name> | 2015-01-17 02:29:54 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2015-01-17 02:29:54 +0000 |
| commit | a1f7b32ceffa4e707a051e58573e60b6603a942b (patch) | |
| tree | 654890c2855ba699425f643e42da712f655bfb7c /dhcpcd.c | |
| parent | c3d69056f1bc64fd9d52050813da385e653b7c5d (diff) | |
| download | dhcpcd-a1f7b32ceffa4e707a051e58573e60b6603a942b.tar.xz | |
Implement RFC4941, Privacy Extensions for Stateless Address Autoconfiguration
in IPv6 when dhcpcd is overriding the in-kernel RA support.
For Linux kernels (3.18+) which support IFA_F_MANAGETEMPADDR the bulk of
this changeset is compiled out and the kernel will manage the temporary
addresses entirely.
For BSD, this is a fully compliant implementation with the caveat
that when dhcpcd is restarted the last non deprecated temp address on the
interface will be treated as being created when it was last updated
rather when it was actually added. Thus this may voilate section 3.3.
As dhcpcd won't restart in normal operation, this isn't an issue.
For Linux (3.18+) which supports IFA_F_MANAGETEMPADDR, the bulk of this
changeset is compiled out as the kernel will manage the temporary addresses.
For older Linux this is a fully compliant implementation with the caveat that
when restarted new temporary addresses will be generated.
Fixes [2ddfcb190f]
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -601,12 +601,8 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx *ctx, int carrier, unsigned int flags, ifp->carrier = LINK_DOWN; script_runreason(ifp, "NOCARRIER"); dhcp6_drop(ifp, "EXPIRE6"); + ipv6_drop(ifp); ipv6nd_drop(ifp); - /* Don't blindly delete our knowledge of LL addresses. - * We need to listen to what the kernel does with - * them as some OS's will remove, mark tentative or - * do nothing. */ - ipv6_free_ll_callbacks(ifp); dhcp_drop(ifp, "EXPIRE"); arp_close(ifp); } @@ -622,8 +618,11 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx *ctx, int carrier, unsigned int flags, #endif if (ifp->wireless) if_getssid(ifp); - configure_interface(ifp, ctx->argc, ctx->argv); + dhcpcd_initstate(ifp); script_runreason(ifp, "CARRIER"); + /* RFC4941 Section 3.5 */ + if (ifp->options->options & DHCPCD_IPV6RA_OWN) + ipv6_gentempifid(ifp); dhcpcd_startinterface(ifp); } } |
