Comment 15 for bug 1758037

Revision history for this message
In , Martin (martin-redhat-bugs) wrote :

Created attachment 1413663
Libpcap patch that logs debug information and bypasses the problem

Thanks for the reproducer. Just for the record, it is necessary to install libvirt-daemon-config-nwfilter package before this starts to work. Then you can attach to running libvirtd using gdb, set the breakpoint and try to start the virtual machine.

The real name of the function is: virNWFilterSnoopDHCPOpen , it took me a while to notice the capital N in SNoop :)

The bug itself is triggered in the function:
pcap_setfilter_linux ->
pcap_setfilter_linux_common ->
reset_kernel_filter

where setsockopt is called with handle->fd as an argument, which is -1 in this case. I am not sure yet, where the -1 came from in this file descriptor, but surrounding this function with a condition bypasses the problem and my VM starts just fine. Though I don't know if the libvirt filter works, because I don't know what it is supposed to do. I attach a patch for libpcap, that can be used for debugging. It is not meant as a fix, rather for other maintainers to try it.