[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH] set icmp_code always to 0 even when -p option is used
From:       Felix Schladt <felix.schladt () gmail ! com>
Date:       2023-06-05 18:03:37
Message-ID: 20230605180337.6041-1-felix.schladt () gmail ! com
[Download RAW message or body]

---
 networking/ping.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/networking/ping.c b/networking/ping.c
index 9805695a1..1c387353f 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -563,7 +563,7 @@ static void sendping4(int junk UNUSED_PARAM)
 
 	memset(pkt, G.pattern, datalen + ICMP_MINLEN + 4);
 	pkt->icmp_type = ICMP_ECHO;
-	/*pkt->icmp_code = 0;*/
+	pkt->icmp_code = 0;
 	pkt->icmp_cksum = 0; /* cksum is calculated with this field set to 0 */
 	pkt->icmp_seq = htons(G.ntransmitted); /* don't ++ here, it can be a macro */
 	pkt->icmp_id = myid;
@@ -586,7 +586,7 @@ static void sendping6(int junk UNUSED_PARAM)
 
 	memset(pkt, G.pattern, datalen + sizeof(struct icmp6_hdr) + 4);
 	pkt->icmp6_type = ICMP6_ECHO_REQUEST;
-	/*pkt->icmp6_code = 0;*/
+	pkt->icmp6_code = 0;
 	/*pkt->icmp6_cksum = 0;*/
 	pkt->icmp6_seq = htons(G.ntransmitted); /* don't ++ here, it can be a macro */
 	pkt->icmp6_id = myid;
-- 
2.41.0

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic