Trouble with juniper connection - invalid HMAC

David Woodhouse dwmw2 at infradead.org
Thu Dec 15 02:16:36 PST 2016


On Thu, 2016-12-15 at 11:11 +0100, Gaute Amundsen wrote:
> No worries, thanks for quick response this time :)
> 
> Unfortunately it seems that made no difference.

Hm.

diff --git a/oncp.c b/oncp.c
index afcbe8b..b8f6c50 100644
--- a/oncp.c
+++ b/oncp.c
@@ -181,6 +181,12 @@ static int process_attr(struct openconnect_info *vpninfo, int group, int attr,
 		vpn_progress(vpninfo, PRG_DEBUG,
 			     _("Received MTU %d from server\n"),
 			     vpninfo->ip_info.mtu);
+		if (vpninfo->reqmtu && vpninfo->ip_info.mtu > vpninfo->reqmtu) {
+			vpn_progress(vpninfo, PRG_ERR,
+				     "Limiting server MTU %d to %d\n",
+				     vpninfo->ip_info.mtu, vpninfo->reqmtu);
+			vpninfo->ip_info.mtu = vpninfo->reqmtu;
+		}
 		break;
 
 	case GRP_ATTR(2, 1):
@@ -767,7 +773,8 @@ int oncp_connect(struct openconnect_info *vpninfo)
 	kmp = reqbuf->pos;
 	buf_append_tlv(reqbuf, 6, 0, NULL); /* TLV group 6 */
 	group = reqbuf->pos;
-	buf_append_tlv_be32(reqbuf, 2, vpninfo->ip_info.mtu);
+	vpn_progress(vpninfo, PRG_ERR, "Requesting MTU %d\n", vpninfo->reqmtu);
+	buf_append_tlv_be32(reqbuf, 2, vpninfo->reqmtu);
 	if (buf_error(reqbuf)) {
 		vpn_progress(vpninfo, PRG_ERR,
 			     _("Error creating oNCP negotiation request\n"));
-- 
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5760 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20161215/b4d18e48/attachment.bin>


More information about the openconnect-devel mailing list