From nobody Thu Aug 8 19:11:47 2024 X-Original-To: dev-commits-src-branches@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 4WfxVW3xB5z5S2G8; Thu, 08 Aug 2024 19:11:47 +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 4WfxVW1NsPz4jX1; Thu, 8 Aug 2024 19:11:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723144307; 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=6o2gWGUij60xvHdv9fNt84e+Yp0ZtJhbIT2Spg8TP20=; b=pdhTFqeLDQodh8MXsTXi1IdTRwNryZy6HEu/llmoiVwO10HzmezYsZNRtnARt+YFIOWko/ B/jRQBtIAOPyObxhaddBT1wU4fp9rSiEJrS99ObTjYyCRFt7hJnt3pTyxdpkTgw1gdFMrd Nm8L19yBcDTLtXHiQmNwBIRNnC9Uj60TiPLuDrGQAsUOUAbTEJvnHf/CbOYJ5GyJXWhjMW fZpSH4XUYq3/dYzDKUT3FNvz8+Zthm7hjBm4QgE2LjUO4mjagLgrXpmGdNaJPcrdKiK4/w bUN/vnvL9MfPBsFuIVswUKkvuBP3J0nGzaF/3ggZdZ2IuL9LXQPbxEBXsEXh5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723144307; a=rsa-sha256; cv=none; b=fmkNT87wMiWbTgO56RldrkGtsIFu8s3FzKA7fiU8kXJMyEHBJMVhXuupFMmHSdqH1qIWqM z67kG8EPwbSmOqCeNIfhfn8S/E9ftpHLSEi0H9pWZ95DKqUEZF3r3qBxHwGW1ttiORGi8M RtZuhFqry0XtBnPGPwlY7j7nLJxvlsmQMYmndPnsD0EPUJQOhqU5VyEgawoZzqrNHzMH6J HKMwy1TENx4gOdjeWcv1ncTxJY9a1cYDWkorkliIaSQF4PqrSZsQ0BC3Ts7J9nhpVvhS9g 9pzubaSFKXtC43KP/NNERyTZL1lZj1/gAENSvUMzs6Kv10mKGE+12PitgW/jBQ== 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=1723144307; 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=6o2gWGUij60xvHdv9fNt84e+Yp0ZtJhbIT2Spg8TP20=; b=tfdYPbFcWh5TVr39oxQkBfnzqI+vPR349H07U81oJK7WEKJwEbobgd3Ng2Yt/4Y3H46zOn 9ywVixIfBRuCVeDNcpBz7nZLrcmgrpnpQFxYfcgFQZ5YTdFflHkkgMPylKCW+lT1eCUi8c +OU23KVBNeFBIjvs9x52422KfNod9LtVyEMz0InMPnjf4lHlMkzw6JD4SrkU8ksR1IYS0N f2cPWklS3hC5LxvvnIkb6ftEnqHf5KlRuTONkVAsHdCw34PTGIGgWCf7snp8VQV9RYADc5 JwiKlbF4Pqb8hPn5kg0fN8hfJepRgxCs39CtOxX1FWQmSuDv7wWHu6xyJqfHXw== 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 4WfxVW0tx1zm35; Thu, 8 Aug 2024 19:11:47 +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 478JBlkJ026779; Thu, 8 Aug 2024 19:11:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 478JBlP7026776; Thu, 8 Aug 2024 19:11:47 GMT (envelope-from git) Date: Thu, 8 Aug 2024 19:11:47 GMT Message-Id: <202408081911.478JBlP7026776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 407ef8669f5a - stable/14 - nd6: Fix the routing table subscription List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 407ef8669f5a30b9269d53d65c82ec881d6f7808 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=407ef8669f5a30b9269d53d65c82ec881d6f7808 commit 407ef8669f5a30b9269d53d65c82ec881d6f7808 Author: Mark Johnston AuthorDate: 2024-07-25 14:26:36 +0000 Commit: Mark Johnston CommitDate: 2024-08-08 19:09:26 +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 (cherry picked from commit a48df53e4249499be3e8779dd30888a405aa81ae) --- 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