diff options
| author | Roy Marples <roy@marples.name> | 2014-03-22 19:55:29 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2014-03-22 19:55:29 +0000 |
| commit | 94a79cea059b28b40656ada0766863812c310a26 (patch) | |
| tree | a7a5692c05279e29dd1164d0dbeaa578bcd10e5c /ipv6.c | |
| parent | 439d6f2d7535e671fe2089bce6424a1ae9b2ff91 (diff) | |
| download | dhcpcd-94a79cea059b28b40656ada0766863812c310a26.tar.xz | |
If not specified, Delegated Prefixes will get an automatic SLA of the
interface index. If the biggest SLA and the assigned prefix fits into a /64
then dhcpcd creates a /64 prefix so that SLAAC works. If bigger than /64
is needed then dhcpcd creates one rounded upto the nearest multiple of 8.
Unless a configured SLA of 0 is assigned, a reject route for the Delegated
Prefix is installed to stop unassigned addresses trying to be resolved upstream.
Addresses added from Delegated Prefixes now have a default address suffix of 1
instead of using a SLAAC style address.
Diffstat (limited to 'ipv6.c')
| -rw-r--r-- | ipv6.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -328,8 +328,8 @@ ipv6_userprefix( { uint64_t vh, vl, user_low, user_high; - if (prefix_len < 0 || prefix_len > 64 || - result_len < 0 || result_len > 64) + if (prefix_len < 0 || prefix_len > 120 || + result_len < 0 || result_len > 120) { errno = EINVAL; return -1; @@ -869,6 +869,10 @@ make_prefix(const struct interface * ifp, const struct ra *rap, !(addr->flags & (IPV6_AF_ONLINK | IPV6_AF_DELEGATEDPFX))) return NULL; + /* Don't install a blackhole route when not creating bigger prefixes */ + if (addr->flags & IPV6_AF_DELEGATEDZERO) + return NULL; + r = make_route(ifp, rap); if (r == NULL) return NULL; |
