summaryrefslogtreecommitdiffstats
path: root/src/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-09-04 12:21:08 +0300
committerRoy Marples <roy@marples.name>2019-09-04 12:21:08 +0300
commit46afeac4a4ddbe43cb5309c17be881b8c2027be4 (patch)
tree82a11ee2ecda8e79433f41421092359223c52a6e /src/ipv6.c
parent20101dd485a9d6954b90696aa1c10eb72fd3f6cc (diff)
downloaddhcpcd-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.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ipv6.c b/src/ipv6.c
index 0a68c89f..ca54dab9 100644
--- a/src/ipv6.c
+++ b/src/ipv6.c
@@ -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;