svn commit: r362909 - in head: sys/netinet6 tests/sys/netinet6

Alexander V. Chernikov melifaro at FreeBSD.org
Fri Jul 3 08:06:27 UTC 2020


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}"


More information about the svn-src-head mailing list