freebsd-dev/sys/netpfil/pf
Kristof Provost b2e0b24f76 pf: Fix panic on overlapping interface names
In rare situations[*] it's possible for two different interfaces to have
the same name. This confuses pf, because kifs are indexed by name (which
is assumed to be unique). As a result we can end up trying to
if_rele(NULL), which panics.

Explicitly checking the ifp pointer before if_rele() prevents the panic.
Note pf will likely behave in unexpected ways on the the overlapping
interfaces.

[*] Insert an interface in a vnet jail. Rename it to an interface which
exists on the host. Remove the jail. There are now two interfaces with
the same name in the host.
2018-12-01 09:58:21 +00:00
..
if_pflog.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
if_pfsync.c pfsync: Add missing unlock 2018-11-02 17:03:53 +00:00
in4_cksum.c SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
pf_altq.h Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of 2018-08-22 19:38:48 +00:00
pf_if.c pf: Fix panic on overlapping interface names 2018-12-01 09:58:21 +00:00
pf_ioctl.c pfsync: Handle syncdev going away 2018-11-02 16:57:23 +00:00
pf_lb.c pf: Replace rwlock on PF_RULES_LOCK with rmlock 2018-05-30 07:11:33 +00:00
pf_mtag.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
pf_norm.c pf: Fix build if INVARIANTS is not set 2018-11-02 19:23:50 +00:00
pf_osfp.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
pf_ruleset.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
pf_table.c pf: Prevent tables referenced by rules in anchors from getting disabled. 2018-11-08 21:54:40 +00:00
pf.c pfsync: Make pfsync callbacks per-vnet 2018-11-02 16:47:07 +00:00
pf.h netpfil: Introduce PFIL_FWD flag 2018-03-23 16:56:44 +00:00