Hardcode path to tcpdump as /usr/sbin/tcpdump.
authorBen Pfaff <blp@nicira.com>
Thu, 16 Oct 2008 20:48:09 +0000 (13:48 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 16 Oct 2008 20:48:09 +0000 (13:48 -0700)
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

index fab43e28e447e9a737a08de5687edc4413db2a43..25988b22c2ba16b75ebc7b3d04c87dbc4df50b9c 100644 (file)
@@ -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);