From 40a6fb4e18256fa778fb036dcacf2d7479ba6529 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 16 Oct 2008 13:48:09 -0700 Subject: [PATCH] Hardcode path to tcpdump as /usr/sbin/tcpdump. Otherwise it won't be found when run as non-root because such users typically don't have /usr/sbin in $PATH. (We use tcpdump in a fashion that doesn't require root privilege.) --- lib/ofp-print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index fab43e28..25988b22 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -126,7 +126,7 @@ ofp_packet_to_string(const void *data, size_t len, size_t total_len) } rewind(pcap); - snprintf(command, sizeof command, "tcpdump -e -n -r /dev/fd/%d 2>/dev/null", + snprintf(command, sizeof command, "/usr/sbin/tcpdump -e -n -r /dev/fd/%d 2>/dev/null", fileno(pcap)); tcpdump = popen(command, "r"); fclose(pcap); -- 2.30.2