diff options
| author | Roy Marples <roy@marples.name> | 2015-04-07 21:16:31 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2015-04-07 21:16:31 +0000 |
| commit | a258c8ddf7257976be62c20c6e3749581c037ea1 (patch) | |
| tree | f2deeec9b4a8386a626f30ce10f79255e30d9bc1 /ipv6.c | |
| parent | 1f209dc76c8068b15000824f9b85c0a27bf8b14a (diff) | |
| download | dhcpcd-a258c8ddf7257976be62c20c6e3749581c037ea1.tar.xz | |
Only take into account useable IPv6 public addresses.
Diffstat (limited to 'ipv6.c')
| -rw-r--r-- | ipv6.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -745,6 +745,14 @@ ipv6_addaddr(struct ipv6_addr *ap, const struct timespec *now) return 0; } +int +ipv6_publicaddr(const struct ipv6_addr *ia) +{ + return (ia->prefix_pltime && + (ia->addr.s6_addr[0] & 0xfe) != 0xc && + !(ia->addr_flags & IN6_IFF_NOTUSEABLE)); +} + struct ipv6_addr * ipv6_findaddr(struct dhcpcd_ctx *ctx, const struct in6_addr *addr, short flags) { |
