Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jul 2020 08:06:26 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r362909 - in head: sys/netinet6 tests/sys/netinet6
Message-ID:  <202007030806.06386QS8095690@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: melifaro
Date: Fri Jul  3 08:06:26 2020
New Revision: 362909
URL: https://svnweb.freebsd.org/changeset/base/362909

Log:
  Fix IPv6 regression introduced by r362900.
  
  PR:		kern/247729

Modified:
  head/sys/netinet6/icmp6.c
  head/tests/sys/netinet6/redirect.sh

Modified: head/sys/netinet6/icmp6.c
==============================================================================
--- head/sys/netinet6/icmp6.c	Fri Jul  3 07:25:26 2020	(r362908)
+++ head/sys/netinet6/icmp6.c	Fri Jul  3 08:06:26 2020	(r362909)
@@ -2277,7 +2277,7 @@ icmp6_redirect_input(struct mbuf *m, int off)
 	in6_splitscope(&reddst6, &kdst, &scopeid);
 	NET_EPOCH_ASSERT();
 	nh = fib6_lookup(ifp->if_fib, &kdst, scopeid, 0, 0);
-	if (nh == NULL) {
+	if (nh != NULL) {
 		struct in6_addr nh_addr;
 		nh_addr = ifatoia6(nh->nh_ifa)->ia_addr.sin6_addr;
 		if ((nh->nh_flags & NHF_GATEWAY) == 0) {

Modified: head/tests/sys/netinet6/redirect.sh
==============================================================================
--- head/tests/sys/netinet6/redirect.sh	Fri Jul  3 07:25:26 2020	(r362908)
+++ head/tests/sys/netinet6/redirect.sh	Fri Jul  3 08:06:26 2020	(r362909)
@@ -87,7 +87,15 @@ valid_redirect_body() {
 	local_ll_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
 
 	# wait for DAD to complete
-	sleep 2
+	while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
+		sleep 0.1
+	done
+	while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
+		sleep 0.1
+	done
+
+	# enable ND debugging in the target jail to ease catching errors
+	jexec ${jname} sysctl net.inet6.icmp6.nd6_debug=1
 
 	# echo "LOCAL: ${local_ll_ip} ${local_ll_mac}"
 	# echo "REMOTE: ${remote_rtr_ll_ip} ${remote_rtr_mac}"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007030806.06386QS8095690>