1 Index: busybox-1.7.2/networking/ping.c
2 ===================================================================
3 --- busybox-1.7.2.orig/networking/ping.c 2007-10-30 15:34:59.000000000 -0500
4 +++ busybox-1.7.2/networking/ping.c 2007-10-30 15:35:05.000000000 -0500
6 struct sockaddr_in pingaddr;
9 - char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN];
10 + char packet[datalen + ICMP_MINLEN + MAXIPLEN + MAXICMPLEN];
12 pingsock = create_icmp_socket();
15 pkt->icmp_type = ICMP_ECHO;
16 pkt->icmp_cksum = in_cksum((unsigned short *) pkt, sizeof(packet));
18 - c = xsendto(pingsock, packet, DEFDATALEN + ICMP_MINLEN,
19 + c = xsendto(pingsock, packet, datalen + ICMP_MINLEN,
20 (struct sockaddr *) &pingaddr, sizeof(pingaddr));
22 /* listen for replies */
24 struct icmp6_hdr *pkt;
27 - char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN];
28 + char packet[datalen + ICMP_MINLEN + MAXIPLEN + MAXICMPLEN];
30 pingsock = create_icmp6_socket();
33 sockopt = offsetof(struct icmp6_hdr, icmp6_cksum);
34 setsockopt(pingsock, SOL_RAW, IPV6_CHECKSUM, &sockopt, sizeof(sockopt));
36 - c = xsendto(pingsock, packet, DEFDATALEN + sizeof (struct icmp6_hdr),
37 + c = xsendto(pingsock, packet, datalen + sizeof (struct icmp6_hdr),
38 (struct sockaddr *) &pingaddr, sizeof(pingaddr));
40 /* listen for replies */