Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: boreas. Use sequence number 1.
Browse files Browse the repository at this point in the history
Close #812

Jira: SC-1064
jjnicola committed Apr 16, 2024
1 parent 541442b commit 2de87c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions boreas/ping.c
Original file line number Diff line number Diff line change
@@ -144,8 +144,8 @@ send_icmp_v6 (int soc, struct in6_addr *dst, int type)
icmp6 = (struct icmp6_hdr *) sendbuf;
icmp6->icmp6_type = type; /* ND_NEIGHBOR_SOLICIT or ICMP6_ECHO_REQUEST */
icmp6->icmp6_code = 0;
icmp6->icmp6_id = 234;
icmp6->icmp6_seq = 0;
icmp6->icmp6_id = rand ();
icmp6->icmp6_seq = 0x0100;

memset ((icmp6 + 1), 0xa5, datalen);
gettimeofday ((struct timeval *) (icmp6 + 1), NULL); // only for testing
@@ -197,6 +197,7 @@ send_icmp_v4 (int soc, struct in_addr *dst)
icmp = (struct icmphdr *) sendbuf;
icmp->type = ICMP_ECHO;
icmp->code = 0;
icmp->un.echo.sequence = 0x0100;

len = 8 + datalen;
icmp->checksum = 0;

0 comments on commit 2de87c6

Please sign in to comment.