vmd(8): skip inspecting non-udp packets on local interfaces
authordv <dv@openbsd.org>
Sun, 23 May 2021 22:43:36 +0000 (22:43 +0000)
committerdv <dv@openbsd.org>
Sun, 23 May 2021 22:43:36 +0000 (22:43 +0000)
commit29e58e7f4377de2b9df73a00edf70f1255cfd635
treee5e53c781e9ab15b806fb2710cbd756fbbbeb8de
parent9e5392b77c95f8cb06227a3dfd2af35d36f5213d
vmd(8): skip inspecting non-udp packets on local interfaces

reyk@ imported packet.c from (I think) dhclient(8). In dhclient,
the packets are already filtered down to just udp. This change has
vmd skip a non-udp ip packet sooner when it's trying to determine
if it is a dhcp/bootp packet that needs processing.

The counters (seen, bad checksums, etc) for ip and udp packets are
also removed as they aren't used by vmd.

This only affects "local" network interfaces for vmd.

OK mlarkin@
usr.sbin/vmd/packet.c