diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-10-10 12:35:26 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-10-10 12:35:26 +0000 |
commit | 5806525653c83a8ecaa5edfa0ae563ec47b97587 (patch) | |
tree | e631a370b62a0c2af5f245c9fac7704656d971f3 /package/network/utils/tcpdump/patches/004-fix_3g_iface.patch | |
parent | 445936955ee182517b6db29bc3baf1a42d762161 (diff) | |
download | upstream-5806525653c83a8ecaa5edfa0ae563ec47b97587.tar.gz upstream-5806525653c83a8ecaa5edfa0ae563ec47b97587.tar.bz2 upstream-5806525653c83a8ecaa5edfa0ae563ec47b97587.zip |
tcpdump: move to trunk and add myself as maintainer
SVN-Revision: 33690
Diffstat (limited to 'package/network/utils/tcpdump/patches/004-fix_3g_iface.patch')
-rw-r--r-- | package/network/utils/tcpdump/patches/004-fix_3g_iface.patch | 28 |
1 files changed, 28 insertions, 0 deletions
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 0000000000..35d105fa51 --- /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 <stdlib.h> + #include <string.h> + #include <limits.h> ++#include <ctype.h> + #ifndef WIN32 + #include <sys/wait.h> + #include <sys/resource.h> +@@ -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"); + |