From nobody Mon Apr 20 14:24:14 2026 X-Original-To: dev-commits-src-main@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 4fznmZ6M2Gz679qV for ; Mon, 20 Apr 2026 14:24:14 +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 4fznmZ5VB7z411J for ; Mon, 20 Apr 2026 14:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776695054; 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=t+2RYTmgsRwMEPcsserbzFCUvY9n3HjxGkvb1TIbiTdUzqE+pIJHTjg1MHVqKTHGE2SBjn 0runC7ZfKGybgQNaXB1oFNlFgGTqLbysNJ4/XEL0FPaDfmbiS71K5V18gAdTWwpgJWMj0M aGOHTXg44/tGanPeG8s6yqoNm6AhxFWmXuCm13lAepVXLb/w9Jw1ZNqmLiJCiOvBjWvvsR Msuy1Uq8P66IbiHqTzNGesXgZdvro44TnQUMk5pWpj8E2n6uSlM1qQ9HhXZ4hqAnyiSVNu bXMnERNMnE8d7iFF9so6N5FPZ3j9O9XK1iN4zxz8NmIm1DLQcbRUoLspqvU+/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776695054; a=rsa-sha256; cv=none; b=I1ZmWeKrj6UbEg+LCB+8Vd1M3L43u4xwNHR6NZ7Has3Uxfcb9+PIzRljEEuEGGbyZ9dK4B 8INsPYtmbZ7o1BSMLFWI1I+D4YmYktGwRSFYi/SxjcjbN4fKntTKEgJfwwZpBbghfVYBUm ybBkF64wOcrOECLk7nVcy9rby5ykewK3ElQmdFzm/QHUcOLb7ZrbpyBMVcKpDcV/9ut+6i mO+ZhCW64fXiyQrWaierbCAbiK3DfGInAVADJO9mtwepJATCLV01p/zxlNRYIUvc2MUbhy sBzfssLcRfyho4FAtyQglGwLsWGhjYZ6YIB68ttJyf1o/v8STNWy6tTyZQCSOg== 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=1776695054; 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=XXKnUx1QkxHhl6FRqP7BDrKJfgo6PkDrvR+nFkajpj7LYn8FptIo7mgt+zbRWUx2cZyqak /ImqpKnY1KBnvaYGdY3iF49PxgkAlRK0h+MBFqTkaT/blDfC3fiAqTvKuxjV4HySogCGe8 iB+Y4fSILyW/dTPChfUXEAkqyY48szg1udjaPfMtED3odPMMjWviDv0FVD5KsamW6uqVrl EGaWYUPnUbZMGAW0chVRe6wi0NZ00IIz0PRWsdrXHpT7ZMv+IZ0mf9JQTXfakJTjdZ1DZi 1mypI0PqGSa/ijqKkeItkxojaZlbnikm6kEtcgWCxqcnPzIL+UOmWRu5szCTRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fznmZ55tTz11WZ for ; Mon, 20 Apr 2026 14:24:14 +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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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); }