summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhedor <khedor@gmail.com>2026-05-22 20:15:23 +0300
committerDenys Fedoryshchenko <denys.f@collabora.com>2026-05-23 11:41:36 +0300
commit028e2090389d2b8968dfb30e4d956264718613e5 (patch)
treef0d7e1d399af8024938d12bfb6ea2215215db123
parenta68821aecb2fecfc7c35fd5d49867f202d64df7f (diff)
downloadaccel-ppp-028e2090389d2b8968dfb30e4d956264718613e5.tar.gz
accel-ppp-028e2090389d2b8968dfb30e4d956264718613e5.zip
pppoe/disc: drop packets with unsupported PPPoE type
The unsupported-PPPoE-type branch in disc_read() logs a warning but falls through to forward() instead of dropping the packet. Compare with the unsupported-version branch immediately above, which has the same shape but continues: if (hdr->ver != 1) { if (conf_verbose) log_warn(...unsupported version...); continue; } if (hdr->type != 1) { if (conf_verbose) log_warn(...unsupported type...); /* falls through into forward() */ } Add the missing continue so malformed packets are dropped instead of processed. Signed-off-by: khedor <khedor@gmail.com>
-rw-r--r--accel-pppd/ctrl/pppoe/disc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/pppoe/disc.c b/accel-pppd/ctrl/pppoe/disc.c
index c302eaff..f7f5c781 100644
--- a/accel-pppd/ctrl/pppoe/disc.c
+++ b/accel-pppd/ctrl/pppoe/disc.c
@@ -363,6 +363,7 @@ static int disc_read(struct triton_md_handler_t *h)
if (hdr->type != 1) {
if (conf_verbose)
log_warn("pppoe: discarding packet (unsupported type %i)\n", hdr->type);
+ continue;
}
if (forward(net, src.sll_ifindex, pack, n))