[Openvpn-devel] [XS] Change in openvpn[master]: Fix extracting IV_MTU

"plaisthos \(Code Review\) via Openvpn-devel" <[email protected]>
Newsgroups net.sourceforge.lists.openvpn-devel
Message-ID <[email protected]>
plaisthos has uploaded this change for review. ( http://gerrit.openvpn.net/c/openvpn/+/1842?usp=email )


Change subject: Fix extracting IV_MTU
......................................................................

Fix extracting IV_MTU

Commit 06ced3fd accidentally broke extracting the MTU from the peer
info while refactoring the code. Before 06ced3fd the code used
iv_mtu as temporary string and extracted the value into client_max_mtu.
The new code never set client_max_mtu and used iv_mtu as integer instead.

Fix this by setting client_max_mtu again with the real MTU value from
the peer.

Change-Id: Ia2e238a41526ebc178c53d3807103d8b9da475a5
Signed-off-by: Arne Schwabe <[email protected]>
---
M src/openvpn/push.c
1 file changed, 2 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/42/1842/1

diff --git a/src/openvpn/push.c b/src/openvpn/push.c
index ce2baf2..357b25f 100644
--- a/src/openvpn/push.c
+++ b/src/openvpn/push.c
@@ -717,10 +717,9 @@
     }
 
     /* Push our mtu to the peer if it supports pushable MTUs */
-    int client_max_mtu = 0;
-    unsigned int iv_mtu = peer_info_extract_uint(tls_multi->peer_info, "IV_MTU=");
+    int client_max_mtu = peer_info_extract_uint(tls_multi->peer_info, "IV_MTU=");
 
-    if (iv_mtu != 0)
+    if (client_max_mtu != 0)
     {
         push_option_fmt(gc, push_list, M_USAGE, "tun-mtu %d", o->ce.tun_mtu);
         if (client_max_mtu < o->ce.tun_mtu)

-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1842?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia2e238a41526ebc178c53d3807103d8b9da475a5
Gerrit-Change-Number: 1842
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.