Hi all,
[Please keep me CC'd on replies, if you would.]
Quick interoperability question, regarding this paragraph in the PROXY
v2 spec:
> - \x0 : LOCAL : the connection was established on purpose by the proxy
> without being relayed. The connection endpoints are the sender and the
> receiver. Such connections exist when the proxy sends health-checks to the
> server. The receiver must accept this connection as valid and must use the
> real connection endpoints and discard the protocol block including the
> family which is ignored.
The phrase "protocol block" is never defined, as far as I can see, and
only "family" is called out explicitly to ignore. So it's not clear to
me how strict an implementation must be when receiving a LOCAL
connection that has a family/protocol byte other than 0x00, or if being
too strict could lead to interop problems with some real-world
implementations.
As a receiver, should we:
1) Accept only 0x00 (AF_UNSPEC/UNSPEC) as the family/protocol byte for
LOCAL connections, and discard the entire address block. Reject any
nonzero value for the family/protocol byte as invalid and terminate the
connection. (max strictness)
2) Ignore the family nibble for LOCAL connections, and discard the
entire address block. Reject any nonzero value for the protocol nibble
as invalid, and terminate the connection.
3) Accept any combination of family and protocol for LOCAL connections,
ignoring them completely, and discard the entire address block. (max
permissiveness)
Option 1 seems to me to be explicitly prohibited, since the spec says
we must "discard the protocol block including the family which is
ignored". Option 3 makes the most sense to me, since LOCAL connections
should be using the UNSPEC protocol by default anyway, but it doesn't
seem to be supported by the spec language.
What would break if we chose the strict option 1? (And if the answer is
"you're overthinking it; it doesn't matter in practice", that's fine
too.)
Thanks,
--Jacob