diff options
| author | Roy Marples <roy@marples.name> | 2019-09-04 12:21:08 +0300 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-09-04 12:21:08 +0300 |
| commit | c77989d640838de6219c9179c70b332afea6569d (patch) | |
| tree | 82a11ee2ecda8e79433f41421092359223c52a6e /src/ipv6.c | |
| parent | 6daa6537e227810f17dfc361266360c4777e73ca (diff) | |
| download | dhcpcd-c77989d640838de6219c9179c70b332afea6569d.tar.xz | |
Solaris: Get the subnet in ipv6 ifa handler
This simplifies the code and allows onlink route "addresses"
to work on P2P interfaces.
Diffstat (limited to 'src/ipv6.c')
| -rw-r--r-- | src/ipv6.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1100,6 +1100,21 @@ ipv6_handleifa(struct dhcpcd_ctx *ctx, struct ll_callback *cb; bool anyglobal; +#ifdef __sun + struct sockaddr_in6 subnet; + + /* Solaris on-link route is an unspecified address! */ + if (IN6_IS_ADDR_UNSPECIFIED(addr)) { + if (if_getsubnet(ctx, ifname, AF_INET6, + &subnet, sizeof(subnet)) == -1) + { + logerr(__func__); + return; + } + addr = &subnet.sin6_addr; + } +#endif + #if 0 char dbuf[INET6_ADDRSTRLEN]; const char *dbp; |
