From nobody Thu Dec 14 21:59:59 2023 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 4SrmVR2hhQz53qWh; Thu, 14 Dec 2023 21:59:59 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SrmVR2D7jz4sXd; Thu, 14 Dec 2023 21:59:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591199; 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=4q3TcuJF2fOitLPirdx+i94FmjDJ60bvlQ0godBv5xs=; b=o5qKpxEYxpgitpR6xfuXw08wNFKg9GaCQkZIET86uzgTx7oqvo9428ZxZvDVgxteXyM2dZ ovgLASut9pnp0CV+PLPMVwDMrpDbtMuTs/3WBTHa1fFIkTiTnzsR+X/7hwtEh/3fg+GhuJ yTVtxS3vjXCWfQw8yMTZCghl/kbYiB1DNA83nlxx3UN9ycVZbwOgD56Cg7D7A48Y2+VkOh 7bNOHd3z1SbiqghanP4XMm6EnWwv/YVQGCSoaQTJLCLD8TA1jFPthdWz+i59Zdy+JZB5GA EkAhvEr/w92i+0yKBtBHlMBLWRFxLWfO2JR4rEq4zhlbvLbIDHfwLdzb/G6CgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702591199; a=rsa-sha256; cv=none; b=hA5YHFXkg26mU0pySTCnYKjg5k3BeSVRGR/913emFaXoNmzCiBz6/bkBiTO0ScDoPPDLSp n708t5hfaKAl/7nyicMxPLsOghPfCRkb+Xiq2wQ60/f0eyAR1ZGQCFicVFnjlp1GN1TaLs bjkblyl5AyXY4HndLRKNSUF/NrbVKbgJMG6BKdPy343BnZrJt7RzIBjVGloYSUDAoXBV39 qckQhShDhMpR0qHjuQz0/ksXGdRqEQ01UZdA+x31J5oMhW3kOWq3nqtSlFNjqHFHbq68w9 r5WPhR7lpDbtFD94sl+QjKDBisM34x49pjhLuhYNReKR8UsTzriCz+AopBQGng== 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=1702591199; 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=4q3TcuJF2fOitLPirdx+i94FmjDJ60bvlQ0godBv5xs=; b=sX3WEW1cA/M0EWIXEnopSusDBIHZsuViv6t9ZUtBOruXzZFSN/PS+jicv2uyGvo2dJuzWW gzC92bPkSX/HymhPY3VL0g52ELEhdWhwenubARav0Wc+QSPMVUQPkKFjIHVo05TTAO1/ZC woba8IZZG8EyuWPN7kznkrk4HTNYpTD/y8dfanayWBeu80BnqAlEXA8Npy+1e3LDCiOzqL Bv6l2+Dg33VvV/KSDeWknGrYLRQIL0roLe/MA9+0Q/5o9uShAUPhRlkoquyJVP6Kf7mjpP P29cCdUXU2ugJb5jDRmdcX/fHzmf1Q1obpOXjKkLrYUbcufqaz7riXg9wdVUFw== 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 4SrmVR1G26zkqV; Thu, 14 Dec 2023 21:59:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BELxxMF010540; Thu, 14 Dec 2023 21:59:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BELxxRO010537; Thu, 14 Dec 2023 21:59:59 GMT (envelope-from git) Date: Thu, 14 Dec 2023 21:59:59 GMT Message-Id: <202312142159.3BELxxRO010537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 0bc82e4fbbe9 - main - ip_mroute: allow MRT_DEL_MFC even if there are pending upcalls 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0bc82e4fbbe9d1eb72b6be512ff92a4908f85fef Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0bc82e4fbbe9d1eb72b6be512ff92a4908f85fef commit 0bc82e4fbbe9d1eb72b6be512ff92a4908f85fef Author: Kristof Provost AuthorDate: 2023-12-12 18:17:40 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 21:04:43 +0000 ip_mroute: allow MRT_DEL_MFC even if there are pending upcalls In del_mfc() we try to find the forwarding entry, but that fails to find the entry if mfc_stall_ring is not empty. We should find the entry anyway, and destroy it (and any pending messages) on delete. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43031 --- sys/netinet/ip_mroute.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 10ac13d7d582..b864a4db5abc 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -1250,22 +1250,17 @@ del_mfc(struct mfcctl2 *mfccp) MRW_WLOCK(); - rt = mfc_find(&origin, &mcastgrp); + LIST_FOREACH(rt, &V_mfchashtbl[MFCHASH(origin, mcastgrp)], mfc_hash) { + if (in_hosteq(rt->mfc_origin, origin) && + in_hosteq(rt->mfc_mcastgrp, mcastgrp)) + break; + } if (rt == NULL) { MRW_WUNLOCK(); return EADDRNOTAVAIL; } - /* - * free the bw_meter entries - */ - free_bw_list(rt->mfc_bw_meter_leq); - rt->mfc_bw_meter_leq = NULL; - free_bw_list(rt->mfc_bw_meter_geq); - rt->mfc_bw_meter_geq = NULL; - - LIST_REMOVE(rt, mfc_hash); - free(rt, M_MRTABLE); + expire_mfc(rt); MRW_WUNLOCK();