-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test programs do not work well when the only capture devices are non-network #1269
Comments
Although this behaviour is consistent with the no-op |
FI to anybody wanting to contribute support, |
Thank you for the hint, I have tried that and managed to get my working copy to capture Ethernet packets almost normally. It is not perfect, but is better than nothing, so I hope to commit this soon. |
Besides that, to resolve this issue well, it would be necessary to define the expected behaviour for the test programs when the host genuinely lacks any network interfaces: should they fail with a more useful error message, or should they just skip the network-specific code paths? |
Do the configure script and CMakeList.txt not find |
The problem is that libpcap doesn't distinguish between network and non-network interfaces, so the test programs don't have an easy way to avoid trying to get the address and net mask for non-network interfaces. |
|
These results are from the 20230608 snapshot of Debian 12 GNU/Hurd. The original problem manifested in libpcap build matrix, which runs
testprogs/findalldevstest
. Upon a closer look it became clear that other test programs also do not work as expected:capturetest
andnonblocktest
default to a non-network device and fail:findalldevstest
fails withselpolltest
andthreadsignaltest
generate a warning:All of the above was attempted as a non-root user. The network interfaces are as follows:
However, tcpdump does not see any network interfaces (whether run as root or not):
To reproduce these results, libdbus-1-dev must be installed before compiling libpcap. If it is not installed, the list of capture devices is empty.
The text was updated successfully, but these errors were encountered: