Re: PPv2: clarify "protocol block" and how to ignore it?

2021-09-10 Thread Tim Düsterhus

Jacob,

On 9/8/21 8:17 PM, Jacob Champion wrote:

Just to double-check, is there a better way for me to have asked my
question, or something I missed in the ML etiquette doc?



You are in the right place and your email looks fine with regard to 
mailing list etiquette. I just assume that there's very few people 
capable of answering your question and that they might've missed your email.


I worked quite a bit on PPv2 within HAProxy and saw your email, but I 
did not write the specification, thus I was unable to give an answer.


Adding Willy to Cc.

Best regards
Tim Düsterhus



Re: PPv2: clarify "protocol block" and how to ignore it?

2021-09-08 Thread Jacob Champion
On Fri, 2021-07-09 at 16:23 -0700, Jacob Champion wrote:
> Hi all,
> 
> [Please keep me CC'd on replies, if you would.]
> 
> Quick interoperability question, regarding this paragraph in the PROXY
> v2 spec:

Hello,

Just to double-check, is there a better way for me to have asked my
question, or something I missed in the ML etiquette doc?

Thanks!
--Jacob



PPv2: clarify "protocol block" and how to ignore it?

2021-07-09 Thread Jacob Champion
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