changeset 4698:2750ed3b1d21 draft

Solaris: Only set IFF_NOLOCAL for onlink only prefixes As per the header: /* No address - just on-link subnet */
author Roy Marples <roy@marples.name>
date Wed, 04 Sep 2019 15:09:29 +0300
parents 78159ff39865
children fcd77169498b
files src/if-sun.c
diffstat 1 files changed, 1 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/if-sun.c	Wed Sep 04 14:53:04 2019 +0300
+++ b/src/if-sun.c	Wed Sep 04 15:09:29 2019 +0300
@@ -1625,14 +1625,6 @@
 	/* We need to update the index now */
 	ia->iface->index = if_nametoindex(ia->alias);
 
-	/* Disabled for now - for some reason dhcpcd cannot setup
-	 * the subnet route correctly even though it looks
-	 * identical in netstat output. */
-#if 0
-	if (if_setflags(fd, ia->alias, IFF_NOLOCAL) == -1)
-		return -1;
-#endif
-
 	sa_in_init(&addr.sa, &ia->addr);
 	sa_in_init(&mask.sa, &ia->mask);
 	sa_in_init(&brd.sa, &ia->brd);
@@ -1675,12 +1667,9 @@
 
 	fd = if_getaf_fd(ia->iface->ctx, AF_INET6);
 
-	if (!IN6_IS_ADDR_LINKLOCAL(&ia->addr)) {
+	if (!(ia->flags & IPV6_AF_AUTOCONF) && ia->flags & IPV6_AF_RAPFX) {
 		if (if_setflags(fd, ia->alias, IFF_NOLOCAL) ==-1)
 			return -1;
-	}
-
-	if (!(ia->flags & IPV6_AF_AUTOCONF) && ia->flags & IPV6_AF_RAPFX) {
 		sa_in6_init(&mask.sa, &ia->prefix);
 		r = if_addaddr(fd, ia->alias,
 		    NULL, &mask.ss, NULL, ia->prefix_len);