From nobody Thu Jul 25 14:27:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WVCsK4kXJz5S88M; Thu, 25 Jul 2024 14:27:49 +0000 (UTC) (envelope-from git@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WVCsK46T5z4Xbn; Thu, 25 Jul 2024 14:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721917669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/lAP5segQIT2QSARLyATLlUk4Le3Jd/LCZyXwGYGaIY=; b=bVFS60cvwDq++bk3VxzXbCI0ME3CX8gWlN1WoxP7UPf7SxBd9DRoWIkj4TvcOtDZEvS8KM onQn2lXXC526w6j+NEv7QFEGBRI9vUB4uqL7rKTyVuR03rYqIpMnRcRLyTiBXewAPBzz9Z G6o2HIMo0qqXr2T5HMTFfOMXmEY1MdGgmIwQ2J+abxjbfpF6RIZ8SqDKRkIA+f6CxF+6Xf 9TJ1zDggLe3sNZUnKUrVj4hE7KhjK7fR7b4WGmK5HjtxWhiZO3dnvqKjZhM0NAk2CPTjpC TzL5dKaA62h126iAPiYZz6deoMOkyNzrx+97D1a1nC+pRcgo0hZCsCPp3yMYGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721917669; a=rsa-sha256; cv=none; b=nONIyiiB/43wC6Jg420JBuYZS4TH9xcW0ZmJtK/+yDxuUYkkweYXn9eEObJICGh10TM/pz honxvkgihYu0Gx4O+NclWXg8SHOVFu2HdIb3z1ArGx5ZxGWTWuAHCZOttajQdudZPMhy7M jrKXx6uPKVkCFn46R6wgsH5xBoIa+Q4SGYpjnIhdFIutkF+oZ5GCLP58Y7Fnr/ZTGnN26s RgCJ9lPihPZPnQASfSj5581rtwYnRJixvd83hjdNIchwWTUmS+mDvy0cL9dafBryYVWKNq sP+ywkeNupDRGkFLgPdWzubojtmtGVXBvqsk+evP7e6c5bu8/5TV5hEyaXeK7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721917669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/lAP5segQIT2QSARLyATLlUk4Le3Jd/LCZyXwGYGaIY=; b=QPel8bsiOY+W4oQFxIK5y9/PzBeCT41Q2s2aFuOvcomYN7xG/Q+pGo+kLOe6vvqnYn9f8n +v5szkgbSocAwkM7kiaEgicURclheK5hOSEP2WUjuzONhhH3jPi3ic/DiZvKHnM3dNbnbx r8zINXSmtL1bzTrhiPMZcRccyi7RnIigE7tYMB07br143QzIxODJjcI4b70bnfal06FW+g oTgAeqrsYpCTRYzychiGPQhAFLGGFMRbltsBDJY1RN+6c20lElhXg+uUrVvflgXD2dUUIy lJ7qjdZ7T8JWh0loP3epxkKlOm+0zYuHuXqEPYFXAdlWfJfsUR871GPo0viJOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WVCsK3bCZzymg; Thu, 25 Jul 2024 14:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46PERnTf016685; Thu, 25 Jul 2024 14:27:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46PERnD5016682; Thu, 25 Jul 2024 14:27:49 GMT (envelope-from git) Date: Thu, 25 Jul 2024 14:27:49 GMT Message-Id: <202407251427.46PERnD5016682@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a48df53e4249 - main - nd6: Fix the routing table subscription List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a48df53e4249499be3e8779dd30888a405aa81ae Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a48df53e4249499be3e8779dd30888a405aa81ae commit a48df53e4249499be3e8779dd30888a405aa81ae Author: Mark Johnston AuthorDate: 2024-07-25 14:26:36 +0000 Commit: Mark Johnston CommitDate: 2024-07-25 14:27:39 +0000 nd6: Fix the routing table subscription The nd6 code listens for RTM_DELETE events so that it can mark the corresponding default router as inactive in the case where the default route is deleted. A subsequent RA from the router may then reinstall the default route. Commit fedeb08b6a58e broke this for non-multipath routes, as rib_decompose_notification() only invokes the callback for multipath routes. Restore the old behaviour. Also ensure that we update the router only for RTM_DELETE notifications, lost in commit 2259a03020fe0. Reviewed by: bz Fixes: fedeb08b6a58 ("Introduce scalable route multipath.") Fixes: 2259a03020fe ("Rework part of routing code to reduce difference to D26449.") MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Bell Tower Integration Differential Revision: https://reviews.freebsd.org/D46020 --- sys/netinet6/nd6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 3eacb05f88d7..e1fd421060df 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1614,8 +1614,7 @@ check_release_defrouter(const struct rib_cmd_info *rc, void *_cbdata) struct nhop_object *nh; nh = rc->rc_nh_old; - - if ((nh != NULL) && (nh->nh_flags & NHF_DEFAULT)) { + if (rc->rc_cmd == RTM_DELETE && (nh->nh_flags & NHF_DEFAULT) != 0) { dr = defrouter_lookup(&nh->gw6_sa.sin6_addr, nh->nh_ifp); if (dr != NULL) { dr->installed = 0; @@ -1627,9 +1626,10 @@ check_release_defrouter(const struct rib_cmd_info *rc, void *_cbdata) void nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *arg) { - #ifdef ROUTE_MPATH rib_decompose_notification(rc, check_release_defrouter, NULL); + if (rc->rc_cmd == RTM_DELETE && !NH_IS_NHGRP(rc->rc_nh_old)) + check_release_defrouter(rc, NULL); #else check_release_defrouter(rc, NULL); #endif