From owner-svn-src-head@freebsd.org Fri Jul 3 08:06:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B71336E068; Fri, 3 Jul 2020 08:06:27 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ynbk728Rz3gYY; Fri, 3 Jul 2020 08:06:26 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D11C68ACE; Fri, 3 Jul 2020 08:06:26 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06386QKs095692; Fri, 3 Jul 2020 08:06:26 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06386QS8095690; Fri, 3 Jul 2020 08:06:26 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202007030806.06386QS8095690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 3 Jul 2020 08:06:26 +0000 (UTC) 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 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head: sys/netinet6 tests/sys/netinet6 X-SVN-Commit-Revision: 362909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 08:06:27 -0000 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}"