From 0adfa0909013ada3e252e3d23bd0cd7ba1bedb43 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 18 Jan 2024 02:36:07 +0100 Subject: [PATCH] typo --- dhcp6.c | 4 ++-- icmp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dhcp6.c b/dhcp6.c index b543926..e4404fa 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -250,7 +250,7 @@ static void dhcp6_send_reply(sessionidt s, tunnelidt t, struct in6_addr *ip6_src ((struct dhcp6_opt_preference *)p_opt)->pref = 255; p_opt = (struct dhcp6_opt_h *) &((struct dhcp6_opt_preference *)p_opt)[1]; // next option - // calculation of lenght + // calculation of length len = ((uint8_t *) p_opt) - ((uint8_t *) p_udp); p_ip6_hdr->ip6_plen = p_udp->len = htons(len); @@ -258,7 +258,7 @@ static void dhcp6_send_reply(sessionidt s, tunnelidt t, struct in6_addr *ip6_src 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(len); // Lenght whitout Ipv6 header + pseudo_hdr.ulp_length = htonl(len); // Length whitout Ipv6 header pseudo_hdr.nexthdr = IPPROTO_UDP; // Checksum is over the udp payload plus the pseudo header p_udp->check = ipv6_checksum(&pseudo_hdr, (uint8_t *) p_udp, len); diff --git a/icmp.c b/icmp.c index b804f2a..b6d4072 100644 --- a/icmp.c +++ b/icmp.c @@ -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);