When receiving a PADO offer, clear stored tags from previous PADO packets.
authortobhe <tobhe@openbsd.org>
Sat, 14 May 2022 09:46:15 +0000 (09:46 +0000)
committertobhe <tobhe@openbsd.org>
Sat, 14 May 2022 09:46:15 +0000 (09:46 +0000)
commitd20143d6e0c7c9095c1bad4006ba766a2fefc79d
tree778c30dbc78bf1f98874008dfadd57e862f00b35
parentedb2f6abd79cf78a4066276bb32dd7f913aeacb5
When receiving a PADO offer, clear stored tags from previous PADO packets.
Keeping and combining tags from multiple previous packets could result in
a single accumulated reply overrunning mbuf size limits.  Also make sure
the tag size fields are reset to 0 if allocation fails.

Add size check on mbuf cluster allocation and fail if more than MCLBYTES
are requested.

From NetBSD.

tested by naddy@
ok bluhm@
sys/net/if_pppoe.c