aboutsummaryrefslogtreecommitdiffstats
path: root/package/busybox/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-03-04 14:36:34 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-03-04 14:36:34 +0000
commitf19a262b235972db5ab173d3a00f616caafe30ae (patch)
tree7cd754d4e705e5471d1b93ab29421401536fbdcc /package/busybox/patches
parent8783fd8160d49172ed4b63d3f255c10cdf73387e (diff)
downloadmaster-187ad058-f19a262b235972db5ab173d3a00f616caafe30ae.tar.gz
master-187ad058-f19a262b235972db5ab173d3a00f616caafe30ae.tar.bz2
master-187ad058-f19a262b235972db5ab173d3a00f616caafe30ae.zip
hopefully fix ping bugs introduced in [6443]
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6505 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/busybox/patches')
-rw-r--r--package/busybox/patches/450-truncated_ping_results.patch13
1 files changed, 1 insertions, 12 deletions
diff --git a/package/busybox/patches/450-truncated_ping_results.patch b/package/busybox/patches/450-truncated_ping_results.patch
index 30e86701a3..f60a1a9c02 100644
--- a/package/busybox/patches/450-truncated_ping_results.patch
+++ b/package/busybox/patches/450-truncated_ping_results.patch
@@ -5,7 +5,7 @@
struct icmp *pkt;
int pingsock, c;
- char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN];
-+ char packet[datalen + MAXIPLEN + MAXICMPLEN];
++ char packet[datalen + ICMP_MINLEN + MAXIPLEN + MAXICMPLEN];
pingsock = create_icmp_socket();
@@ -18,17 +18,6 @@
(struct sockaddr *) &pingaddr, sizeof(struct sockaddr_in));
if (c < 0) {
-@@ -257,8 +257,8 @@
-
- gettimeofday(&tv, NULL);
-
-- /* discard if too short */
-- if (sz < (datalen + ICMP_MINLEN))
-+ /* discard if too short / long */
-+ if (sz < (datalen + ICMP_MINLEN) || sz > (MAXICMPLEN))
- return;
-
- /* check IP header */
@@ -274,6 +274,10 @@
++nreceived;
tp = (struct timeval *) icmppkt->icmp_data;