Skip to content

Commit 21e664b

Browse files
committed
tcpdump: put the interface name into all open error messages.
Don't assume that a libpcap error message will include the interface name.
1 parent 1f9e444 commit 21e664b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tcpdump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ open_interface(const char *device, netdissect_options *ndo, char *ebuf)
13621362
*/
13631363
cp = pcap_geterr(pc);
13641364
if (status == PCAP_ERROR)
1365-
error("%s", cp);
1365+
error("%s: %s", device, cp);
13661366
else if (status == PCAP_ERROR_NO_SUCH_DEVICE) {
13671367
/*
13681368
* Return an error for our caller to handle.

0 commit comments

Comments
 (0)