Open
Description
musl libc in src/network/serv.c
"implements" the function as follows:
struct servent *getservent(void)
{
return 0;
}
This disables the TCP and UDP port number to name translation:
# GNU libc
$ ./tcpdump -nq -r tests/tcp_rst_data.pcap
reading from file tests/tcp_rst_data.pcap, link-type EN10MB (Ethernet), snapshot length 65535
22:03:19.190965 IP 199.204.31.89.80 > 172.16.133.41.52875: tcp 58
$ ./tcpdump -q -r tests/tcp_rst_data.pcap
reading from file tests/tcp_rst_data.pcap, link-type EN10MB (Ethernet), snapshot length 65535
22:03:19.190965 IP 199.204.31.89.http > 172.16.133.41.52875: tcp 58
# musl libc
$ ./tcpdump -nq -r tests/tcp_rst_data.pcap
reading from file tests/tcp_rst_data.pcap, link-type EN10MB (Ethernet), snapshot length 65535
22:03:19.190965 IP 199.204.31.89.80 > 172.16.133.41.52875: tcp 58
$ ./tcpdump -q -r tests/tcp_rst_data.pcap
reading from file tests/tcp_rst_data.pcap, link-type EN10MB (Ethernet), snapshot length 65535
22:03:19.190965 IP 199.204.31.89.80 > 172.16.133.41.52875: tcp 58
A possible solution could be forcing the substitute function from missing/getservent.c
similarly to the-tcpdump-group/libpcap#1462.
Metadata
Metadata
Assignees
Labels
No labels