summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/net.c b/net/net.c
index 7812877..f55c7fa 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1407,6 +1407,10 @@ NetReceive(volatile uchar * inpkt, int len)
if (ip->ip_off & htons(0x1fff)) { /* Can't deal w/ fragments */
return;
}
+ /* can't deal with headers > 20 bytes */
+ if ((ip->ip_hl_v & 0x0f) > 0x05) {
+ return;
+ }
if (!NetCksumOk((uchar *)ip, IP_HDR_SIZE_NO_UDP / 2)) {
puts ("checksum bad\n");
return;