Problem: A big of hackery done to avoid calling pcap_fileno is not valid. The pcap_fileno documentation has long been corrected to indicate it should be used. ebuild should use it. Original author notes in traceproto.c: /* * this is a specific weirdness. See the README for more details. * * The pcap_fileno is a bit borrowed from Michael Toren * and his tcptraceroute. Appearently the pcap documentation * is blatently wrong here and the pcap_fileno actually returns * the socket fd, not the fd of the logfile. * * So now you have a choice. You can use my crude kludge to * break the encapsulation, or you can use the "legit" but * badly mis-documented library function....see the configure * options. */ The current proper way is using this function and it should be defaulted to used Reproducible: Always Steps to Reproduce: 1. Emerge package and observe configuration output states "checking whether to use pcap_fileno... no" 2. Run installed package and observe incorrect behavior: traceproto: trace to 1.1.1.1 (1.1.1.1), port 80 ttl 1:*** bit out of range 0 - FD_SETSIZE on fd_set ***: terminated Program received signal SIGABRT, Aborted. 0x00007ffff7d4d54c in ?? () from /usr/lib64/libc.so.6 (gdb) bt #0 0x00007ffff7d4d54c in ?? () from /usr/lib64/libc.so.6 #1 0x00007ffff7cf7706 in raise () from /usr/lib64/libc.so.6 #2 0x00007ffff7cdf8fa in abort () from /usr/lib64/libc.so.6 #3 0x00007ffff7ce0956 in ?? () from /usr/lib64/libc.so.6 #4 0x00007ffff7dd90eb in __fortify_fail () from /usr/lib64/libc.so.6 #5 0x00007ffff7dd8bc2 in __fdelt_warn () from /usr/lib64/libc.so.6 #6 0x0000555555558049 in main (argc=<optimized out>, argv=<optimized out>) at traceproto.c:1057 (gdb) up 6 #6 0x0000555555558049 in main (argc=<optimized out>, argv=<optimized out>) at traceproto.c:1057 1057 FD_SET( state.fake_psocket->fd, & ( state.wheel ) ); (gdb) print /x state.fake_psocket->fd $1 = 0xf7f140f0 Actual Results: traceproto: trace to 1.1.1.1 (1.1.1.1), port 80 ttl 1:*** bit out of range 0 - FD_SETSIZE on fd_set ***: terminated Expected Results: Expected something like this (obviously depends on network) traceproto 1.1.1.1 -w 1 traceproto: trace to 1.1.1.1 (1.1.1.1), port 80 ttl 1:no response ICMP Time Exceeded from xxxxxxx.local (192.168.8.1) 0.034000 ms 920.73 ms ttl 2: ICMP Time Exceeded from yyyyyy.local (192.168.1.254) Configure script already supports what we need. Documentation for pcap is now corrected. Just a matter of changing default behavior to the supported API and avoiding the broken implementation.
Created attachment 903596 [details] emerge info
Created attachment 903597 [details, diff] patch file to fix econf Trivial fix
Created attachment 903598 [details] build log of defective package