From ca86bf6ca63770714e70b5c9659f4d3709b619df Mon Sep 17 00:00:00 2001 From: Andreas Gnau Date: Sun, 17 May 2020 19:46:09 +0200 Subject: [PATCH] ppp: Reject unknown protocols NX won't send any IPCP requests until CCP negotiation is completed. Since we don't want to implement compression for now (or ever), reject unknown protocols with an LCP Protocol-Reject (cf. RFC 1661, ch. 5.7). Signed-off-by: Andreas Gnau --- ppp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ppp.c b/ppp.c index 5186b1c1..1a2a6b4f 100644 --- a/ppp.c +++ b/ppp.c @@ -1087,7 +1087,9 @@ int ppp_mainloop(struct openconnect_info *vpninfo, int *timeout, int readable) _("PPP packet with unknown protocol 0x%04x. Payload:\n"), proto); dump_buf_hex(vpninfo, PRG_ERR, '<', pp, payload_len); - return 1; + if (queue_config_packet(vpninfo, PPP_LCP, ++ppp->lcp.id, PROTREJ, payload_len + (pp - ph), ph)) + vpn_progress(vpninfo, PRG_ERR, + _("Failed queuing Protocol-Reject for unknown protocol 0x%04x.\n"), proto); } if (next_len) { -- 2.49.0