diff options
author | Gabriel Jeanneau <gabriel.jeanneau@6wind.com> | 2022-01-13 11:59:49 +0100 |
---|---|---|
committer | Stéphane Gonauer <stephane.gonauer@6wind.com> | 2022-03-04 13:11:03 +0100 |
commit | 57d5aa43123b8a8243e8e8e6971597afe352f9ed (patch) | |
tree | d564d88d88775c49f32a2b92054ee55a82b2c644 /accel-pppd/ppp/ppp.c | |
parent | 99951ab338a1727150b312fca914631dcf838201 (diff) | |
download | accel-ppp-57d5aa43123b8a8243e8e8e6971597afe352f9ed.tar.gz accel-ppp-57d5aa43123b8a8243e8e8e6971597afe352f9ed.zip |
ppp_chan_read: check unit_hnd avoiding proto rej
When receiving IPCP packet on channel handler, check unit handler to
avoid sending a LCP Protocol Reject because ppp unit has not been
created yet.
This patch allows accel-ppp to handle higher pressure (handle 300
connections per second).
Signed-off-by: Gabriel Jeanneau <gabriel.jeanneau@6wind.com>
Diffstat (limited to 'accel-pppd/ppp/ppp.c')
-rw-r--r-- | accel-pppd/ppp/ppp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c index 49b53b1a..8a4cce7c 100644 --- a/accel-pppd/ppp/ppp.c +++ b/accel-pppd/ppp/ppp.c @@ -430,6 +430,11 @@ cont: } } + list_for_each_entry(ppp_h, &ppp->unit_handlers, entry) { + if (ppp_h->proto == proto) + goto cont; + } + lcp_send_proto_rej(ppp, proto); //log_ppp_warn("ppp_chan_read: discarding unknown packet %x\n", proto); } |