From nobody Wed Sep 04 12:50:26 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 4WzMm25HDqz5Tr0Y; Wed, 04 Sep 2024 12:50:26 +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 4WzMm24ZsDz58fD; Wed, 4 Sep 2024 12:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725454226; 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=R5O2VTvTlmsFMBThbZySK6u54vWprc38oGaiCIZtfMc=; b=F4jZ3I0XCwUje90ttN+VVwlTn3//SJ6yW297S7aZAeSRi+oONmkKx0CrhWwhKiFrIcM+1q NWXN7LUJnQXD7s6RRS6UrL3ObW2/KM6OGDEgglVVwilPgxmU189+DNvHUvGFJHPkut14VO Fd9Vh8y/XbclBL+X44p0HoAxXCpwCAyNFkS+RQD3RJ5QAj0sqqBXSWY6bi8h5d9DgWmZOw 8ANIJ/IwRqi0T6cxh6Wxr0dxbqoo7+uJgph8OLKfCB3vKOHJ1Pq0df4LuiD+B1CK5PHwHH oQD9lC1uVjXBfLokmWoubEJ2/DQmx6b5Yp3zB6xDMSYHVAOwMNbcGKl130RCfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725454226; a=rsa-sha256; cv=none; b=q2oraKgCOM9kMrHItvF1SyQMWy8JrgavNC4oacZVIgOHmKpPXN7/bkdfFOrnLhi0YuuwUu d4RjZRb8Cb+Nbtp7Oyjn0qkZH+myrjQMFs0y9+bgItbj1OuXWiD53W6cT9qL36EbojLizk 3vJO/GakIQTiLZUxrz72c5FSRDshZE+esj2LKkzpGW8O5IuR36v6t3VSy/LTkZ8LfYiPyR b1uQhv8CqjQud+bnf0xpC1tKvcrqTcmcete2awBKM3xige5KuYD4buLt3olsZdwTDsZdG6 VBVhmpeiCX1MUdmdX1v56LsZDO4hJu82IkBsRKunnFhT20OVxaJ+k1ky0mj5Xw== 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=1725454226; 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=R5O2VTvTlmsFMBThbZySK6u54vWprc38oGaiCIZtfMc=; b=jIDOoweuACp/tgBnQw+/3IpPX1ZOqGlu8pU8bBHn9zs6CNXI9W+pkRUojtBw6w9MEddWJU 8UG2WHPIWHPVhwoX5aoJTon5NKyA7nuZhZLtKZJGpGLcKEmtfkZONh5OP3N86nSL0P13lG V4fWT9zaZyFArZDvWs2d43EBOrwM5tS0X/lHS5FKgvBAZ6jLWYxDjNmxv5TiYqv+MnSgU5 aCMyWiqt5vFHwcOifpxr1dRJKHNif/fb0b2p++kArLZXh5BLj4PIrge5NcrbSVkCEGvsSY QupW20E13UZ+mqEFHHNEQ6PzJu1+ZBX74Vp2B5HFjrN44UZ2H0wvl4adOa4/2A== 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 4WzMm24B1xzPj0; Wed, 4 Sep 2024 12:50:26 +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 484CoQMr005232; Wed, 4 Sep 2024 12:50:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 484CoQit005229; Wed, 4 Sep 2024 12:50:26 GMT (envelope-from git) Date: Wed, 4 Sep 2024 12:50:26 GMT Message-Id: <202409041250.484CoQit005229@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: b6d6674fecbd - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: b6d6674fecbdb9a752a893860938837ef76e8cf7 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b6d6674fecbdb9a752a893860938837ef76e8cf7 commit b6d6674fecbdb9a752a893860938837ef76e8cf7 Author: Mark Johnston AuthorDate: 2024-07-25 14:26:36 +0000 Commit: Mark Johnston CommitDate: 2024-09-04 12:49:50 +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 39c4b498e938..70fb468176a5 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1595,8 +1595,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; @@ -1608,9 +1607,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