I just came across a broken PPP PAP ACK packet which was just 4 bytes
long, because it lacked the message-length octet.
pppd 2.4.5 accepts such truncated PPP PAP ACKs and only logs a debugging
message, but at least it generates 5 byte packets. LWIP copied that
code. TI NDK accepts truncated packets as well, although it also
generates them, so perhaps it counts less. Wireshark correctly detects
truncated authentication ACKs for PAP in PPP, but tcpdump does not.
break;
case PAP_AACK:
case PAP_ANAK:
+ /* Although some implementations ignore truncation at
+ * this point and at least one generates a truncated
+ * packet, RFC 1334 section 2.2.2 clearly states that
+ * both AACK and ANAK are at least 5 bytes long.
+ */
+ if (len < 5)
+ goto trunc;
if (length - (p - p0) < 1)
return;
ND_TCHECK(*p);