Fix a bug and some comments using copy-pasted '4' when '6' is needed

This commit is contained in:
dmiller 2026-06-15 15:14:09 +00:00
parent 96ceee0393
commit 65ed79b280
2 changed files with 3 additions and 3 deletions

View file

@ -353,7 +353,7 @@ struct in6_addr NpingTarget::getIPv6SourceAddress() {
/** Returns IPv6 host address or NULL if unavailable.*/
const struct in6_addr *NpingTarget::getIPv6SourceAddress_aux() {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &sourcesock;
if (sin6->sin6_family == AF_INET) {
if (sin6->sin6_family == AF_INET6) {
return &(sin6->sin6_addr);
}
return NULL;
@ -366,7 +366,7 @@ u8 *NpingTarget::getIPv6SourceAddress_u8(){
return NULL;
else
return (u8*)in->s6_addr;
} /* End of getIPv6Address_u8() */
} /* End of getIPv6SourceAddress_u8() */
/** If the host is directly connected on a network, set and retrieve

View file

@ -1001,7 +1001,7 @@ int ProbeMode::fillPacketICMP(NpingTarget *target, u8 *buff, int bufflen, int *f
break;
}
/* Fill the IPv4Header object with the info from NpingOps */
/* Fill the IPv6Header object with the info from NpingOps */
createIPv6(&i6, &c6, "ICMPv6", target);
/* Compute checksum */