The packet filter fails to capture any packets when tcpdump is used
with a filter expression on the tunnel or loopback device.
Fix: I am not sure if the problem is in the drivers, the kernel packet
filter, or in tcpdump. The loopback and tunnel devices attach to
the bpf with a device type of DLT_NULL and dummy up a link level
header that contains the adddress family for the packet, always
AF_INET. Using a dummy PPP header in the drivers and attaching to
the bpf with DLT_PPP works.
This patch is probably not the correct fix but it will provide the
missing functionality. A bpf guru needs to fix this the right way.
tcpdump -i lo0 icmp on one terminal
ping localhost on another terminal
Verified to be working correctly under -current.