Date: Thu, 6 Feb 2025 18:32:37 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: d8413a1c3ba2 - main - ifnet: Fix build without BPF Message-ID: <202502061832.516IWbBr038184@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d8413a1c3ba235a79ae6b8cc35767a861855c7e2 commit d8413a1c3ba235a79ae6b8cc35767a861855c7e2 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2025-02-06 18:32:05 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2025-02-06 18:32:05 +0000 ifnet: Fix build without BPF The newly introduced function bpf_ifdetach() is only available when device bpf is enabled. Fixes: 1ed9b381d470 ifnet: Detach BPF descriptors on interface vmove event --- sys/net/if.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index 283da94e7601..ce0c3d5c0616 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1262,10 +1262,12 @@ finish_vnet_shutdown: static void if_vmove(struct ifnet *ifp, struct vnet *new_vnet) { +#ifdef DEV_BPF /* * Detach BPF file descriptors from its interface. */ bpf_ifdetach(ifp); +#endif /* * Detach from current vnet, but preserve LLADDR info, do not
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502061832.516IWbBr038184>