Content-Type: multipart/alternative; boundary="------------Sq2dNwzWRg56Zu8H2rGmZvkX" Message-ID: <92cf0278-85b5-4563-93d4-7a814de2cc86@...2726...> Date: Thu, 15 Feb 2024 20:50:43 +0100 MIME-Version: 1.0 References: Content-Language: it From: Gianmarco De Gregori In-Reply-To: Subject: Re: [Openvpn-devel] [S] Change in openvpn[master]: Minor fix to process_ip_header List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gert Doering , arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... This is a multi-part message in MIME format. --------------Sq2dNwzWRg56Zu8H2rGmZvkX Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Il 15/02/2024 17:17, Gert Doering ha scritto: > Hi, > > On Thu, Feb 15, 2024 at 03:59:02PM +0000, its_Giaan (Code Review) wrote: >> if (buf->len > 0) >> { >> - /* >> - * The --passtos and --mssfix options require >> - * us to examine the IPv4 header. >> - */ >> - >> - if (flags & (PIP_MSSFIX >> -#if PASSTOS_CAPABILITY >> - | PIPV4_PASSTOS >> -#endif >> - | PIPV4_CLIENT_NAT >> - )) >> + if (flags & PIP_OPT_MASK) > NAK, as this is not the same thing. PIP_OPT_MASK will also match on > the IPv6 flags, which are not something we need to test for here (= if > only an IPv6 flag is active, why should we enter this branch?). I had the feeling that it was wrong in fact. Thanks for your feedback. Cheers -- Gianmarco De Gregori --------------Sq2dNwzWRg56Zu8H2rGmZvkX Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi,

Il 15/02/2024 17:17, Gert Doering ha scritto:
Hi,

On Thu, Feb 15, 2024 at 03:59:02PM +0000, its_Giaan (Code Review) wrote:
     if (buf->len > 0)
     {
-        /*
-         * The --passtos and --mssfix options require
-         * us to examine the IPv4 header.
-         */
-
-        if (flags & (PIP_MSSFIX
-#if PASSTOS_CAPABILITY
-                     | PIPV4_PASSTOS
-#endif
-                     | PIPV4_CLIENT_NAT
-                     ))
+        if (flags & PIP_OPT_MASK)
NAK, as this is not the same thing.  PIP_OPT_MASK will also match on
the IPv6 flags, which are not something we need to test for here (= if
only an IPv6 flag is active, why should we enter this branch?).

I had the feeling that it was wrong in fact.

Thanks for your feedback.

Cheers

-- 
Gianmarco De Gregori
--------------Sq2dNwzWRg56Zu8H2rGmZvkX--