HomeFreeBSD

wg: detach bpf upon destroy as well

Description

wg: detach bpf upon destroy as well

bpfattach() is called in wg_clone_create(), but the bpfdetach() is
missing from wg_close_destroy(). Add the missing bpfdetach() to avoid
leaking both the associated bpf bits as well as the ifnet that bpf will
hold a reference to.

PR: 276526

(cherry picked from commit 43be2d7aaf25b719aec8f49aab110c0061f1edec)

Details

Provenance
aly_aaronly.meAuthored on Jan 22 2024, 4:18 PM
kevansCommitted on Jan 30 2024, 5:38 AM
Parents
rGce2d249b2070: if_wg: fix access to noise_local->l_has_identity and l_private
Branches
Unknown
Tags
Unknown