From nobody Thu Aug 8 22:41:45 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 4Wg28n4lyPz5SSgJ; Thu, 08 Aug 2024 22:41:45 +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 4Wg28n39pWz45VB; Thu, 8 Aug 2024 22:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723156905; 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=Y109/xOqN4Bb4p/b40CMxtwNLE8d5xUf7KR52lWWywk=; b=h+VFcoEWgmLJfq58x6aUfPEd5CaqybDbHLtQmb2tRsX9Lag2MFoiqOP0bZdHhDm/gZKj1v ava0bOnGp/TJfDkmiTuZ9sKjDoQ3de84mAr0q+U63d3wOz/ot+RB+E/OmlbSQ050fuZEA2 k7CcF0+347EqzbVPeRhUinHdXW/OCQnz9Q8RHPh2iwhnKD0FoDtkUehUvrDtOU9VPPmfvq 1nHzG6AOh9zYkIq5ujRvLoSsjqnr4gNod8QyQX+rI5rP9hJGlh7xALBbzyR9vkA577/HFU pwF57aTun9OkYvxdFLau4EJ1yBKHZIeCdrJvDrqCN54QBL9QyMMZgmjA0lgI0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723156905; a=rsa-sha256; cv=none; b=HaX0aRHojZTgxcmoFGP7uLkGrU4yStUGNHdLEc54+Vh/KqwtaQu48fqdZ2AHsmsvrbE6Tr SBC5FLuk8/PgiseTucuAAELHTsPDkYQVF8b/fBFVa8nVN7ucPXVwiEfo+B9hcGiALXN+7x w9nY5N+qtMZ+H3TqSYQ82xYeYvbB7HK8Qgkx+FL7vG8THNyHCS20LZnAMi9/oLnVtERH5a nvESvO0rG9mBxjoHQ1fBwQszhCMc52u1gwzgxwmEQRrONtrON6R9+HXjx1uY2HcbvqxqO7 L1rhgvTHrI74xfiGKznxz/nwgPikgpjDU8NVurWWijHZ3Pt935rpoZdma4e1ww== 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=1723156905; 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=Y109/xOqN4Bb4p/b40CMxtwNLE8d5xUf7KR52lWWywk=; b=cDbeo4T8ACm02b5UlKYPHuaIutzf3Ar1o1AO8WMRm1imW3uR5JKZRAYlP9sh/QNRyS7vEf u/zmGmMqVM4JYo1l1R+id/VJSSIyoOm9cx0LvAwLuaVh5z3ny06xNG7lRgOvDwOuq4X71L BfLLd/VlsR00vLa6dVswAJ6Q3VJ2LpI8CNRJ4lDlYSf8a1aev2PCKjMf5rpi8gQj/Dp9Vc zuKy5uW9XAICm24mtLOg3TLdaq6JMusg+DEgoL2dSZJYxoMV5Z6aFtWRkBgKgMdCbltEoA OEyJPaLUirHc0xmV7QBxn3ncpaJNDs7ipUmWAlrbDemJd8mERRjlnOM/WBeFvw== 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 4Wg28n2ndMzs0Q; Thu, 8 Aug 2024 22:41:45 +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 478Mfjta085384; Thu, 8 Aug 2024 22:41:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 478Mfjvo085381; Thu, 8 Aug 2024 22:41:45 GMT (envelope-from git) Date: Thu, 8 Aug 2024 22:41:45 GMT Message-Id: <202408082241.478Mfjvo085381@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: 751c889691cc - releng/13.4 - 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/releng/13.4 X-Git-Reftype: branch X-Git-Commit: 751c889691cc93087251a5af45b6da796d5d2e85 Auto-Submitted: auto-generated The branch releng/13.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=751c889691cc93087251a5af45b6da796d5d2e85 commit 751c889691cc93087251a5af45b6da796d5d2e85 Author: Mark Johnston AuthorDate: 2024-07-25 14:26:36 +0000 Commit: Mark Johnston CommitDate: 2024-08-08 22:41:29 +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. Approved by: re (cperciva) 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) (cherry picked from commit c611f050d0dc01bf1f738300365895da84aa5fef) --- 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