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 | 46afeac4a4ddbe43cb5309c17be881b8c2027be4 (patch) | |
| tree | 82a11ee2ecda8e79433f41421092359223c52a6e /src/ipv6.c | |
| parent | 20101dd485a9d6954b90696aa1c10eb72fd3f6cc (diff) | |
| download | dhcpcd-46afeac4a4ddbe43cb5309c17be881b8c2027be4.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; |
