summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorGabriel Jeanneau <gabriel.jeanneau@6wind.com>2022-01-13 11:59:49 +0100
committerStéphane Gonauer <stephane.gonauer@6wind.com>2022-03-04 13:11:03 +0100
commit57d5aa43123b8a8243e8e8e6971597afe352f9ed (patch)
treed564d88d88775c49f32a2b92054ee55a82b2c644 /accel-pppd
parent99951ab338a1727150b312fca914631dcf838201 (diff)
downloadaccel-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')
-rw-r--r--accel-pppd/ppp/ppp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c
index 49b53b1..8a4cce7 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);
}