Module Name:    src
Committed By:   kre
Date:           Sat Nov 25 13:18:02 UTC 2017

Modified Files:
        src/sys/netinet6: ip6_input.c ip6_output.c

Log Message:
Attempt to restore v6 networking.   Not 100% certain that these
changes are all that is needed, but they're certainly a big part of it
(especially the ip6_input.c change.)


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/netinet6/ip6_input.c
cvs rdiff -u -r1.194 -r1.195 src/sys/netinet6/ip6_output.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet6/ip6_input.c
diff -u src/sys/netinet6/ip6_input.c:1.184 src/sys/netinet6/ip6_input.c:1.185
--- src/sys/netinet6/ip6_input.c:1.184	Fri Nov 24 14:03:25 2017
+++ src/sys/netinet6/ip6_input.c	Sat Nov 25 13:18:02 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_input.c,v 1.184 2017/11/24 14:03:25 roy Exp $	*/
+/*	$NetBSD: ip6_input.c,v 1.185 2017/11/25 13:18:02 kre Exp $	*/
 /*	$KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.184 2017/11/24 14:03:25 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.185 2017/11/25 13:18:02 kre Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_gateway.h"
@@ -526,7 +526,7 @@ ip6_input(struct mbuf *m, struct ifnet *
 			addrok = (ifa_ifwithaddr(sin6tosa(&sin6)) != NULL);
 			pserialize_read_exit(s);
 		} else
-			addrok = 0;
+			addrok = 1;
 		if (addrok) {
 			/* this address is ready */
 			ours = 1;

Index: src/sys/netinet6/ip6_output.c
diff -u src/sys/netinet6/ip6_output.c:1.194 src/sys/netinet6/ip6_output.c:1.195
--- src/sys/netinet6/ip6_output.c:1.194	Fri Nov 24 14:03:25 2017
+++ src/sys/netinet6/ip6_output.c	Sat Nov 25 13:18:02 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_output.c,v 1.194 2017/11/24 14:03:25 roy Exp $	*/
+/*	$NetBSD: ip6_output.c,v 1.195 2017/11/25 13:18:02 kre Exp $	*/
 /*	$KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.194 2017/11/24 14:03:25 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.195 2017/11/25 13:18:02 kre Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -3388,7 +3388,7 @@ ip6_ifaddrvalid(const struct in6_addr *s
 	else if (ia6->ia6_flags & IN6_IFF_TENTATIVE)
 		error = 1;
 	else if (ia6->ia6_flags & IN6_IFF_DETACHED &&
-	    ifa_ifwithaddr(sin6tosa(&dst)) == NULL)
+	    (sin6.sin6_addr = *dst, ifa_ifwithaddr(sin6tosa(&sin6)) == NULL))
 		/* Allow internal traffic to DETACHED addresses */
 		error = 1;
 	else

Reply via email to