Re: [Openvpn-devel] [PATCH] Fix logic error in checking early negotiation support check
Hi, On 16/11/2022 01:54, Arne Schwabe wrote: Without the == it is enough if any of the bits EARLY_NEG_START is set (0xf0), we want them all to be set. If EARLY_NEG_START were a flag/single bit, you would be right. Ouch, I indeed assumed it was 1 bit only.. Cheers, -- Antonio Quartulli ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [PATCH applied] Re: Fix logic error in checking early negotiation support check
Acked-by: Gert Doering The discussion in the mail thread and on IRC explains why we need to check the full EARLY_NEG_START value (because it's "0x0f" in the topmost byte, not "just one bit set"). This is because it was done that way initially, and now it is what it is... so what this patch adds is "ignore the uppermost 4 bits in comparison, should we want to use these 4 bits for protocol extention in the future". Arguably one could just do "(pin.id & EARLY_NEG_START) == EARLY_NEG_START" here, but maybe this way it's clear what is being looked at. Only compile tested. Your patch has been applied to the master branch. commit 543f709f13bca9887cabd4545554539f18346e3c Author: Arne Schwabe Date: Tue Nov 15 13:29:40 2022 +0100 Fix logic error in checking early negotiation support check Signed-off-by: Arne Schwabe Acked-by: Gert Doering Message-Id: <20221115122940.1947284-1-a...@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25519.html Signed-off-by: Gert Doering -- kind regards, Gert Doering ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel