This commit is contained in:
Samuel Thibault 2024-01-18 02:36:07 +01:00
parent 7ddeea4205
commit 0adfa09090
2 changed files with 3 additions and 3 deletions

2
icmp.c
View file

@ -192,7 +192,7 @@ void send_ipv6_ra(sessionidt s, tunnelidt t, struct in6_addr *ip)
memset(&pseudo_hdr, 0, sizeof(pseudo_hdr));
memcpy(&pseudo_hdr.src, &p_ip6_hdr->ip6_src, 16);
memcpy(&pseudo_hdr.dest, &p_ip6_hdr->ip6_dst, 16);
pseudo_hdr.ulp_length = htonl(l); // Lenght whitout Ipv6 header
pseudo_hdr.ulp_length = htonl(l); // Length whitout Ipv6 header
pseudo_hdr.nexthdr = IPPROTO_ICMPV6;
// Checksum is over the icmp6 payload plus the pseudo header
p_nra->nd_ra_cksum = ipv6_checksum(&pseudo_hdr, (uint8_t *) p_nra, l);