aboutsummaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-08-03 14:40:17 +0000
committerOmar Polo <op@omarpolo.com>2024-08-03 14:40:17 +0000
commit905a32998fc46eea222fff851aab69eea4ac8e8a (patch)
treec84ef2222e5ab9df8a5accc87462fd3638130fae /parse.y
parenta6b469c41b427f70e285c9e89dcfede523c81a51 (diff)
proxy-protocol: accept cross-family proxying
Due to a strict interpretation of the spec if "TCP4" is used we expect two ipv4 addresses (and similar for "TCP6" and ipv6 addresses). However, the family specified in the proxy header matters only for the first address (the source), not the destination! After all, it's not strange to proxy from/to ipv4 and ipv6. Use getaddrinfo(NI_NUMERICHOST) to parse the IP addresses since inet_pton() is too strict.
Diffstat (limited to 'parse.y')
0 files changed, 0 insertions, 0 deletions