From: "plaisthos (Code Review)" Date: Fri, 26 Jul 2024 11:45:33 +0000 In-Reply-To: References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, ralf@...2726..., frank@...2641... Message-ID: <287fc038a977d62a20fadc1ed08ee0acdca0d302-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="mClWeMVQeaI="; charset=UTF-8 Subject: [Openvpn-devel] [L] Change in openvpn[master]: Add support for HAProxy's PROXY protocol List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ralf_lici Cc: flichtenheld , openvpn-devel --mClWeMVQeaI= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: ralf_lici. plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c= /openvpn/+/685?usp=3Demail ) Change subject: Add support for HAProxy's PROXY protocol ...................................................................... Patch Set 1: Code-Review-1 (9 comments) Patchset: PS1: I think this needs more overhaul File CMakeLists.txt: http://gerrit.openvpn.net/c/openvpn/+/685/comment/59d24823_1499669a : PS1, Line 494: src/openvpn/proxy_protocol.h haproxy_protocol.c/haproxy_protol.h Currently it looks like they are related to the other proxy code which they= are not. File doc/proxy-protocol.txt: http://gerrit.openvpn.net/c/openvpn/+/685/comment/4932a48c_3085af39 : PS1, Line 8: https://www.haproxy.org/download/2.4/doc/proxy-protocol.txt Is this just a copy and paste of the document or is this addition to that d= ocument? It would be good to clarify the relationship between these docuemn= ts. http://gerrit.openvpn.net/c/openvpn/+/685/comment/4a84e43a_90eb3cad : PS1, Line 11: a binary version (v2). Is this protocol TCP only? I assume so, so would be good to mention this. http://gerrit.openvpn.net/c/openvpn/+/685/comment/1508ed20_2e564dcb : PS1, Line 26: --------- Why are supporting two new protocls? Is there a need to introduce an alread= y deprecated protocol to OpenVPN? http://gerrit.openvpn.net/c/openvpn/+/685/comment/f26ed461_54c16e70 : PS1, Line 97: The v2 signature of the protocol: "\x0D\x0A\x0D\x0A\x00\x0D= \x0A\x51\x55\x49\x54\x0A\x20". Really? The singnature is '\r\n\r\n\x00\r\nQUIT\n'? http://gerrit.openvpn.net/c/openvpn/+/685/comment/28038db2_443fb0fb : PS1, Line 108: What does this mean in the openvpn context? http://gerrit.openvpn.net/c/openvpn/+/685/comment/aff6de14_525b6ce9 : PS1, Line 115: DGRAM (0x2). if this is dgram, is the protocol still over tcp or does it use UDP then? File src/openvpn/socket.c: http://gerrit.openvpn.net/c/openvpn/+/685/comment/9d712c5d_d6c36d0f : PS1, Line 2684: /* check if it's a PROXY protocol header */ I don't think this is the right place to add this. This will be basically c= alled on every link_socket_read_tcp and not just on the first packets. Also= it seems to be enabled always so this might have side effects on non-hapro= xy operation. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/685?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I9766c68feaba71279f26c3310eee4b5ca215e6ac Gerrit-Change-Number: 685 Gerrit-PatchSet: 1 Gerrit-Owner: ralf_lici Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: ralf_lici Gerrit-Comment-Date: Fri, 26 Jul 2024 11:45:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --mClWeMVQeaI= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: ralf_lici.

Patch set 1:Code-Review -1=

Vi= ew Change

9 comments:

  • Patchset:

    • Patch Set #1:

      I think this needs more overhaul

    • File CMakeLists.txt:

      • Patch Set #1, Line 494:= src/openvpn/proxy_prot= ocol.h

        haproxy_protocol.c/haproxy_protol.h

        Currently it looks like they are related to the oth= er proxy code which they are not.

    • File doc/proxy-protocol.txt:

      • Patch Set #1, Line 8: https://www.haproxy.org/download/2.4/doc/proxy-pr= otocol.txt

        Is this just a copy and paste of the document or is this addition to t= hat document? It would be good to clarify the relationship between these do= cuemnts.

      • Patch Set #1, Line 11: a binary version (v2).

        Is this protocol TCP only? I ass= ume so, so would be good to mention this.

      • Patch Set #1, Li= ne 26: ---------=

        Why are supp= orting two new protocls? Is there a need to introduce an already deprecated= protocol to OpenVPN?

      • Patch Set #1, Line 97: The v2 signature of the protocol: = "\x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A\x20".

        Really? The sin= gnature is '\r\n\r\n\x00\r\nQUIT\n'?

      • Patch Set #1,= Line 108:

        <= p style=3D"white-space: pre-wrap; word-wrap: break-word;">What does this me= an in the openvpn context?

      • Patch Set #1, Line 115: DGRAM (0x2).

        if this is dgram, i= s the protocol still over tcp or does it use UDP then?

    • File src/openvpn/socket.c:

      • Patch Set #1, Line 2684: = /* check if it&= #39;s a PROXY protocol header */

        I don't think this is the right place to add= this. This will be basically called on every link_socket_read_tcp and not = just on the first packets. Also it seems to be enabled always so this might= have side effects on non-haproxy operation.

    To v= iew, visit change 685. To unsubscribe, or for help writing mail filters, visit <= a href=3D"http://gerrit.openvpn.net/settings">settings.

    Gerrit-Project: openvpn
    Gerrit-Branch: master
    Gerrit-Change-Id: I9766c68feaba71279f26c3310ee= e4b5ca215e6ac
    Gerrit-Change-Number: 685
    Gerrit-PatchSet: 1
    Gerrit-Owner: ralf_lici <ralf@...2726...>= ;
    Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
    Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
    Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
    Gerrit-Attention: ralf_lici <ralf@...2804...= .>
    Gerrit-Comment-Date: Fri, 26 Jul 2024 11:45:33= +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment
    --mClWeMVQeaI=--