>From e3ff3056c8024ee859e541d33dbaecb614f12b94 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 1 Oct 2013 16:09:17 +0200 Subject: [PATCH] Use the smaller of the X-CSTP-MTU and X-DTLS-MTU. X-CSTP-MTU is accounted only when no X-DTLS-MTU is not set, or if it is smaller. Signed-off-by: Nikos Mavrogiannopoulos --- cstp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cstp.c b/cstp.c index bb79e7e..3875280 100644 --- a/cstp.c +++ b/cstp.c @@ -364,7 +364,7 @@ static int start_cstp_connection(struct openconnect_info *vpninfo) } } else if (!strcmp(buf + 7, "MTU")) { int cstpmtu = atol(colon); - if (cstpmtu > mtu) + if (mtu == 0 || cstpmtu < mtu) mtu = cstpmtu; } else if (!strcmp(buf + 7, "Address")) { if (strchr(new_option->value, ':')) { -- 1.8.4.rc3