#define DTLS_CONNECTING 4 /* ESP probe received; must tell server */
#define DTLS_CONNECTED 5 /* Server informed and should be sending ESP */
-#define PPP_ENCAP_F5 1 /* F5 BigIP no HDLC */
-#define PPP_ENCAP_F5_HDLC 2 /* F5 BigIP HDLC */
-#define PPP_ENCAP_FORTINET_HDLC 3 /* Fortinet HDLC */
-#define PPP_ENCAP_NX_HDLC 4 /* SonicWall NetExtender HDLC */
+#define PPP_ENCAP_RFC1661 1 /* Plain/synchronous/pre-framed PPP (RFC1661) */
+#define PPP_ENCAP_RFC1662_HDLC 2 /* PPP with HDLC-like framing (RFC1662) */
+#define PPP_ENCAP_F5 3 /* F5 BigIP no HDLC */
+#define PPP_ENCAP_F5_HDLC 4 /* F5 BigIP HDLC */
+#define PPP_ENCAP_FORTINET_HDLC 5 /* Fortinet HDLC */
+#define PPP_ENCAP_NX_HDLC 6 /* SonicWall NetExtender HDLC */
#define PPP_ENCAP_MAX PPP_ENCAP_NX_HDLC
#define COMPR_DEFLATE (1<<0)
static const char *encap_names[PPP_ENCAP_MAX+1] = {
NULL,
+ "RFC1661",
+ "RFC1662 HDLC",
"F5",
"F5 HDLC",
"FORTINET HDLC",
case PPP_ENCAP_F5_HDLC:
case PPP_ENCAP_FORTINET_HDLC:
+ case PPP_ENCAP_RFC1662_HDLC:
ppp->encap_len = 0;
ppp->hdlc = 1;
break;
ppp->hdlc = 1;
break;
+ case PPP_ENCAP_RFC1661:
+ ppp->encap_len = 0;
+ break;
+
default:
free(ppp);
return -EINVAL;
if (vpninfo->dump_http_traffic)
dump_buf_hex(vpninfo, PRG_DEBUG, '<', eh, len);
- /* check pre-PPP header */
+ /* Deencapsulate from pre-PPP header */
switch (ppp->encap) {
case PPP_ENCAP_F5:
magic = load_be16(eh);
case PPP_ENCAP_F5_HDLC:
case PPP_ENCAP_FORTINET_HDLC:
+ case PPP_ENCAP_RFC1662_HDLC:
payload_len = unhdlc_in_place(vpninfo, eh + ppp->encap_len, len - ppp->encap_len, &next);
if (payload_len < 0)
continue; /* unhdlc_in_place already logged */
vpn_progress(vpninfo, PRG_ERR, _("Invalid PPP encapsulation\n"));
vpninfo->quit_reason = "Invalid encapsulation";
return -EINVAL;
+
+ case PPP_ENCAP_RFC1661:
+ payload_len = len;
+ next = eh + payload_len;
+ break;
}
ph = eh + ppp->encap_len;
vpninfo->current_ssl_pkt = this;
}
- /* Add pre-PPP encapsulation header */
+ /* Encapsulate into pre-PPP header */
eh = this->data - this->ppp.hlen - ppp->encap_len;
switch (ppp->encap) {
case PPP_ENCAP_F5: