From nobody Mon Apr 20 14:24:14 2026 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 4fznmh09bsz679yp for ; Mon, 20 Apr 2026 14:24:20 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fznmg5pZDz411d for ; Mon, 20 Apr 2026 14:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776695059; 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=W3NCnOBq95z4MrxlhFNMnzxfm8fnHopaJRbizpcT3YQ=; b=jQuow22J5ErBgvwxq9+1OiphDlWqQeyA5aEQZcqxWIu5YgBG0Xv8Civ0oLvmQMAcn8OEIg T66RrqGnqijJYF8u5jr8IgRIk2AtL0FmWKEeem0ssnP4HgbWtJfjkXCfe2yUHj6GnU50o2 fI262xHxhbhLgBqZpcwJ3s3OZa9uX9kwufvWZ2G/Ur12wj+iO9133ZBV5m5QtnkCr6/Jxa GnRwvjG7MopTMPxr2jtqqFZwBt8vjZRUULnNUqoX52wSHG8eIcFDVcACGa553WX8pJqOSo ohrgxuJaQrLgcx7TZ+uTYfNYoW7YRTuNBIutPqeD/jeDPSNe6/PP4eLwDgwcxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776695059; a=rsa-sha256; cv=none; b=AHNE5lKZ3WRTmG2cyzEEQWfvSP8uV8GNSYCAIYZ7ZxsYm1PaXZFXI4pU1QToizXsCi9W5+ hzGFaX6PDTHAWdHhfeLL1LOyhk+HrO7lEo1oze/SpgAkVOmyorUOLwA0+VrcBkbWK/5uW7 E51kM1y7QaxcBH0X1H/GaYl19VNXtat9roQwShdiQVxhgHX71cjkW0Ew5+zV9m+YymZCnh xYOSwb7jjVWCFz00CiHwFg9Dzo68hFvKqAZfsVN/Xzd2DnEC7WsxCbobenw528/YM0z9ao hnOF/T7Q5asPlf2klcF1kyZFSfgokn7DMNyvLbW9O83Ava5E8DgsFeW3cT17og== 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=1776695059; 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=W3NCnOBq95z4MrxlhFNMnzxfm8fnHopaJRbizpcT3YQ=; b=FusawKhTr7Otm/AVNCnolA3rpPSRinJ1UaQthJp1jn3NQtGw8nhbcmk1Ge4Sxm+iv1a4o7 lSlE/PJXavjsPihlaIDFk5G7eZSU+pxp0RBpNeBAVNVyOfw3wmPvBbNDAseJxqPUceuuMx t3y/ZhCX0nRz106X6gC//x7GBN+7Q8tbjaaq4qL35LCeLHVf9UiUMT3jPiMruTNlLNeVoG /H9oFdCK22uzFaJshmpThLA6IxOOOrwfSDiTvIMgPjSH+QK7M2UA83ElTwreoXF2SK3ySI gkmdblPpTGRWq035lugnQATaIz7cs4fQaXTJMs8AaA9msBcX52dRUtVyy13/Xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fznmg5M2Rz11jM for ; Mon, 20 Apr 2026 14:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2503f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Apr 2026 14:24:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: ff76ec3e9b28 - main - pf: be more robust against interface name conflicts 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff76ec3e9b287df9378f09ce29eca668162903f4 Auto-Submitted: auto-generated Date: Mon, 20 Apr 2026 14:24:14 +0000 Message-Id: <69e6370e.2503f.594c1b58@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ff76ec3e9b287df9378f09ce29eca668162903f4 commit ff76ec3e9b287df9378f09ce29eca668162903f4 Author: Kristof Provost AuthorDate: 2026-04-20 09:22:13 +0000 Commit: Kristof Provost CommitDate: 2026-04-20 12:50:40 +0000 pf: be more robust against interface name conflicts pf assumes that interface names are unique (and share a namespace with interface group names). Unfortunately the FreeBSD network stack has a few edge cases where this assumption can be violated. Try to be more robust against this: rather than changing the association between a kif and ifp just ignore the next interface with the same name. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_if.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c index 5288de3d78a0..507879004b17 100644 --- a/sys/netpfil/pf/pf_if.c +++ b/sys/netpfil/pf/pf_if.c @@ -498,8 +498,15 @@ pfi_attach_ifnet(struct ifnet *ifp, struct pfi_kkif *kif) V_pfi_update++; kif = pfi_kkif_attach(kif, ifp->if_xname); + if (kif->pfik_ifp != NULL && kif->pfik_ifp != ifp) { + /* Try to not panic later. */ + printf("WARNING: pf: duplicate interface name detected: %s\n", + if_name(ifp)); + return; + } if_ref(ifp); kif->pfik_ifp = ifp; + MPASS(ifp->if_pf_kif == NULL); ifp->if_pf_kif = kif; pfi_kkif_update(kif); }