vpn_progress(vpninfo, PRG_ERR,
_("Server terminated connection (session expired)\n"));
vpninfo->quit_reason = "VPN session expired";
+ } else if (lenbuf[0] == 8) {
+ vpn_progress(vpninfo, PRG_ERR,
+ _("Server terminated connection (idle timeout)\n"));
+ vpninfo->quit_reason = "Idle timeout";
} else {
vpn_progress(vpninfo, PRG_ERR,
_("Server terminated connection (reason: %d)\n"),
lenbuf[0]);
vpninfo->quit_reason = "Server terminated connection";
}
+ return -EPIPE;
} else {
vpn_progress(vpninfo, PRG_ERR,
_("Server sent zero-length oNCP record\n"));
vpninfo->quit_reason = "Zero-length oNCP record";
+ return -EIO;
}
- return -EIO;
}
}
if (len > vpninfo->oncp_rec_size)
} else if (avp_vendor == VENDOR_JUNIPER2 && avp_code == 0xd4f) {
realm_entry++;
} else if (avp_vendor == VENDOR_JUNIPER2 && avp_code == 0xd5c) {
- uint32_t val;
-
if (avp_len != 4)
goto auth_unknown;
- val = load_be32(avp_p);
+ uint32_t val = load_be32(avp_p);
if (val)
vpninfo->auth_expiration = time(NULL) + val;
+ } else if (avp_vendor == VENDOR_JUNIPER2 && avp_code == 0xd75) {
+ if (avp_len != 4)
+ goto auth_unknown;
+ uint32_t val = load_be32(avp_p);
+
+ if (val)
+ vpninfo->idle_timeout = val;
} else if (avp_vendor == VENDOR_JUNIPER2 && avp_code == 0xd53) {
free(vpninfo->cookie);
vpninfo->cookie = strndup(avp_p, avp_len);