summaryrefslogtreecommitdiff
path: root/clientname.c
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2021-09-26 11:24:24 -0700
committerWayne Davison <wayne@opencoder.net>2021-09-26 11:25:18 -0700
commit5818cf85961360fcc555b55c9dab1ddbe92513a3 (patch)
tree7543f8bba9d80a8e99e929175e0e867a72576482 /clientname.c
parent1fa0bd1e87030c450026e149ccfa959e066b318a (diff)
downloadrsync-5818cf85961360fcc555b55c9dab1ddbe92513a3.tar.gz
Add missing INET6 check.
Diffstat (limited to 'clientname.c')
-rw-r--r--clientname.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clientname.c b/clientname.c
index 30e888cd..0222f8eb 100644
--- a/clientname.c
+++ b/clientname.c
@@ -214,11 +214,13 @@ int read_proxy_protocol_header(int fd)
return 0;
inet_ntop(AF_INET, hdr.v2.addr.ip4.src_addr, ipaddr_buf, sizeof ipaddr_buf);
return valid_ipaddr(ipaddr_buf);
+#ifdef INET6
case PROXY_FAM_TCPv6:
if (size != sizeof hdr.v2.addr.ip6)
return 0;
inet_ntop(AF_INET6, hdr.v2.addr.ip6.src_addr, ipaddr_buf, sizeof ipaddr_buf);
return valid_ipaddr(ipaddr_buf);
+#endif
default:
break;
}