HomeFreeBSD

bpf: Add IfAPI analogue for bpf_peers_present()

Description

bpf: Add IfAPI analogue for bpf_peers_present()

An interface's bpf could feasibly not exist, in which case
bpf_peers_present() would panic from a NULL pointer dereference. Solve
this by adding a new IfAPI that includes a NULL check. Since this API
is used in only a handful of locations, it reduces the the NULL check
scope over inserting the check into bpf_peers_present().

Sponsored by: Juniper Networks, Inc.
MFC after: 1 week

Details