typo
This commit is contained in:
parent
7ddeea4205
commit
0adfa09090
2 changed files with 3 additions and 3 deletions
4
dhcp6.c
4
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);
|
||||
|
|
|
|||
2
icmp.c
2
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue