aboutsummaryrefslogtreecommitdiffstats
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
commit07cb246bd750bf7798b2debf609d304e8d48fba5 (patch)
tree09c6e5f2b1d1cd8dfd85739cd7325fe91b2d0a4e
parenteb83bc789a353f4f6715edc8e6ed13ce0f054f72 (diff)
downloadupstream-07cb246bd750bf7798b2debf609d304e8d48fba5.tar.gz
upstream-07cb246bd750bf7798b2debf609d304e8d48fba5.tar.bz2
upstream-07cb246bd750bf7798b2debf609d304e8d48fba5.zip
hopefully fix ping bugs introduced in [6443]
SVN-Revision: 6505
-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;