svn commit: branches/busybox_1_3_stable/networking
vda at busybox.net
vda at busybox.net
Thu Feb 1 23:11:06 UTC 2007
Author: vda
Date: 2007-02-01 15:11:04 -0800 (Thu, 01 Feb 2007)
New Revision: 17700
Log:
backport htons(ntransmitted++) fix
Modified:
branches/busybox_1_3_stable/networking/ping.c
branches/busybox_1_3_stable/networking/ping6.c
Changeset:
Modified: branches/busybox_1_3_stable/networking/ping.c
===================================================================
--- branches/busybox_1_3_stable/networking/ping.c 2007-02-01 19:20:16 UTC (rev 17699)
+++ branches/busybox_1_3_stable/networking/ping.c 2007-02-01 23:11:04 UTC (rev 17700)
@@ -217,9 +217,10 @@
pkt->icmp_type = ICMP_ECHO;
pkt->icmp_code = 0;
pkt->icmp_cksum = 0;
- pkt->icmp_seq = htons(ntransmitted++);
+ pkt->icmp_seq = htons(ntransmitted);
pkt->icmp_id = myid;
CLR(ntohs(pkt->icmp_seq) % MAX_DUP_CHK);
+ ntransmitted++;
gettimeofday((struct timeval *) &pkt->icmp_dun, NULL);
pkt->icmp_cksum = in_cksum((unsigned short *) pkt, sizeof(packet));
Modified: branches/busybox_1_3_stable/networking/ping6.c
===================================================================
--- branches/busybox_1_3_stable/networking/ping6.c 2007-02-01 19:20:16 UTC (rev 17699)
+++ branches/busybox_1_3_stable/networking/ping6.c 2007-02-01 23:11:04 UTC (rev 17700)
@@ -205,9 +205,10 @@
pkt->icmp6_type = ICMP6_ECHO_REQUEST;
pkt->icmp6_code = 0;
pkt->icmp6_cksum = 0;
- pkt->icmp6_seq = htons(ntransmitted++);
+ pkt->icmp6_seq = htons(ntransmitted);
pkt->icmp6_id = myid;
CLR(pkt->icmp6_seq % MAX_DUP_CHK);
+ ntransmitted++;
gettimeofday((struct timeval *) &pkt->icmp6_data8[4], NULL);
More information about the busybox-cvs
mailing list