Move conditional compilation of MPC8XXX SPI driver to Makefile
[platform/kernel/u-boot.git] / net / net.c
index 7812877..f55c7fa 100644 (file)
--- 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;