On Fri, Jun 24, 2022 at 10:35:24AM +0200, Frank Lichtenheld wrote: > Code changes look fine to me, but several documentation suggestions.
Hmm, after reading the next patch might I suggest to move the change to push.c actually to the next patch? Both references to IV_MTU and tun-max-mtu only make sense then, right? > On Tue, Jun 21, 2022 at 06:16:48PM +0200, Arne Schwabe wrote: > > diff --git a/src/openvpn/push.c b/src/openvpn/push.c > > index 63257348a..463957a82 100644 > > --- a/src/openvpn/push.c > > +++ b/src/openvpn/push.c > > @@ -603,6 +603,22 @@ prepare_push_reply(struct context *c, struct gc_arena > > *gc, > > { > > push_option_fmt(gc, push_list, M_USAGE, "key-derivation tls-ekm"); > > } > > + > > + /* Push our mtu to the peer if it supports pushable MTUs */ > > + int client_max_mtu = 0; > > + const char *iv_mtu = extract_var_peer_info(tls_multi->peer_info, > > "IV_MTU=", gc); > > + > > + if (iv_mtu && sscanf(iv_mtu, "%d", &client_max_mtu) == 1) > > random space before sscanf > > > + { > > + push_option_fmt(gc, push_list, M_USAGE, "tun-mtu %d", > > o->ce.tun_mtu); > > + if (client_max_mtu < o->ce.tun_mtu) > > + { > > + msg(M_WARN, "Warning reported maximum MTU from client (%d) is > > lower " > > Missing colon after "Warning". > > > + "than MTU used on the server (%d). Add tun-max-mtu %d " > > + "to client configuration.", client_max_mtu, > > + o->ce.tun_mtu, o->ce.tun_mtu); > > + } > > + } > > return true; > > } > > > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel