Am 13.12.21 um 13:35 schrieb Frank Lichtenheld:

Arne Schwabe <a...@rfc2549.org> hat am 07.12.2021 18:01 geschrieben:
[...]
diff --git a/src/openvpn/mss.c b/src/openvpn/mss.c
index aa5b68ce9..56dea0292 100644
--- a/src/openvpn/mss.c
+++ b/src/openvpn/mss.c
[...]
@@ -204,3 +206,41 @@ mss_fixup_dowork(struct buffer *buf, uint16_t maxmss)
          }
      }
  }
+
+void
+frame_calculate_mssfix(struct frame *frame, struct key_type *kt,
+                       const struct options *options)
+{
+    if (options->ce.mssfix == 0)
+    {
+        return;
+    }

Wouldn't an ASSERT be better here? This essentially should never happen because 
ce.mssfix is initialized
to MSSFIX_DEFAULT, anyway. If you handle this without an error here it looks 
like this will just explode
later in mss_fixup_dowork. An ASSERT might be easier and cleaner.

--mssfix 0 can be used to disable MSSFIX but I broke that in this patch. So basically that test is testing if mssfix is enabled.

Arne


_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to