mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
Fixed new IPv6 range code for platforms without s6_addr32 component
This commit is contained in:
parent
ba27f6c3ba
commit
b3325144f8
3 changed files with 4 additions and 2 deletions
2
CHANGES
2
CHANGES
|
@ -85,6 +85,8 @@ Porting:
|
|||
Related Gentoo bug 426262: Warning on configure.in
|
||||
Thanks to Francesco Turco for reporting that warning.
|
||||
|
||||
Fixed new IPv6 range code for platforms without s6_addr32 component.
|
||||
|
||||
Testing:
|
||||
test.sh: Show a warning when phase-1 (insecure phase) of a security
|
||||
test fails
|
||||
|
|
2
test.sh
2
test.sh
|
@ -6865,7 +6865,7 @@ case "$TESTS" in
|
|||
TEST="$NAME: TCP4 mapped into TCP6 address space"
|
||||
if ! eval $NUMCOND; then :;
|
||||
elif true; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}Feature reoved${NORMAL}\n" $N
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}Feature removed${NORMAL}\n" $N
|
||||
elif ! testaddrs tcp ip6 >/dev/null || ! runsip6 >/dev/null; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}TCP6 not available${NORMAL}\n" $N
|
||||
numCANT=$((numCANT+1))
|
||||
|
|
|
@ -190,7 +190,7 @@ int xiocheckrange_ip6(struct sockaddr_in6 *pa, struct xiorange *range) {
|
|||
sockaddr_inet6_info(pa, peername, sizeof(peername)));
|
||||
|
||||
for (i = 0; i < 4; ++i) {
|
||||
masked.u6_addr32[i] = pa->sin6_addr.s6_addr32[i] & rangemask->u6_addr32[i];
|
||||
masked.u6_addr32[i] = ((union xioin6_u *)&pa->sin6_addr.s6_addr[0])->u6_addr32[i] & rangemask->u6_addr32[i];
|
||||
}
|
||||
Debug8("masked address is [%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]",
|
||||
htons(masked.u6_addr16[0]), htons(masked.u6_addr16[1]),
|
||||
|
|
Loading…
Reference in a new issue