nwfilter: directly use poll to wait for packets instead of pcap_next
nwfilter: directly use poll to wait for packets instead of pcap_next

When a QEMU VM shuts down its TAP device gets deleted while nwfilter
IP address learning thread is still capturing packets. It is seen that
with TPACKET_V3 support in libcap, the pcap_next() call will not always
exit its poll() when the NIC is removed. This prevents the learning
thread from exiting which blocks the rest of libvirtd waiting on mutex
acquisition. By switching to do poll() in libvirt code, we can ensure
that we always exit the poll() at a time that is right for libvirt.

Reviewed-by: John Ferlan <87558058f6f829e5ec976c8ef960720af4ff9c7d@redhat.com>
Signed-off-by: Daniel P. Berrangé <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

olafhering/libvirt,jardasgit/libvirt,olafhering/libvirt,jardasgit/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,libvirt/libvirt,zippy2/libvirt,eskultety/libvirt,crobinso/libvirt,libvirt/libvirt,jardasgit/libvirt,libvirt/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,libvirt/libvirt,jardasgit/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,olafhering/libvirt,jardasgit/libvirt,zippy2/libvirt,crobinso/libvirt,jfehlig/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,eskultety/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,zippy2/libvirt,nertpinx/libvirt,jfehlig/libvirt,andreabolognani/libvirt,nertpinx/libvirt,andreabolognani/libvirt,eskultety/libvirt,eskultety/libvirt,jfehlig/libvirt,olafhering/libvirt,eskultety/libvirt,crobinso/libvirt,jfehlig/libvirt,nertpinx/libvirt,zippy2/libvirt,crobinso/libvirt