From eddf659a7f7cbbab715eefe7ebee4a3f8a2fbc02 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 10 Oct 2012 12:35:26 +0000 Subject: tcpdump: move to trunk and add myself as maintainer git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33690 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../utils/tcpdump/patches/004-fix_3g_iface.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/network/utils/tcpdump/patches/004-fix_3g_iface.patch (limited to 'package/network/utils/tcpdump/patches/004-fix_3g_iface.patch') diff --git a/package/network/utils/tcpdump/patches/004-fix_3g_iface.patch b/package/network/utils/tcpdump/patches/004-fix_3g_iface.patch new file mode 100644 index 000000000..35d105fa5 --- /dev/null +++ b/package/network/utils/tcpdump/patches/004-fix_3g_iface.patch @@ -0,0 +1,28 @@ +--- a/tcpdump.c ++++ b/tcpdump.c +@@ -66,6 +66,7 @@ extern int SIZE_BUF; + #include + #include + #include ++#include + #ifndef WIN32 + #include + #include +@@ -625,6 +626,7 @@ main(int argc, char **argv) + #ifdef HAVE_PCAP_FINDALLDEVS + pcap_if_t *devpointer; + int devnum; ++ char *devp; + #endif + int status; + #ifdef WIN32 +@@ -775,7 +777,8 @@ main(int argc, char **argv) + * It can be useful on Windows, where more than + * one interface can have the same name. + */ +- if ((devnum = atoi(optarg)) != 0) { ++ for (devp = optarg; *devp && isdigit(*devp); devp++); ++ if ((!*devp || isspace(*devp)) && (devnum = atoi(optarg)) != 0) { + if (devnum < 0) + error("Invalid adapter index"); + -- cgit v1.2.3