Commit 6b52cfe16cd539935e32bd8cf19146522e462a4d
Committed by
Ben Warren
1 parent
d6ee5fa40c
Exists in
master
and in
54 other branches
Get rid of annoying/superfluous bad-checksum warning message
U-boot can complain a lot about 'checksum bad' when it is attached to the network. It is annoying for ordinary users who start to doubt the network connection in general when they see messages like this. This is caused by the routine NetCksumOk() which cannot handle IP-headers longer than 20 bytes. Those packages can be ignored anyway by U-boot, so we trash them now before checking the checksum. Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
net/net.c
... | ... | @@ -1407,6 +1407,10 @@ |
1407 | 1407 | if (ip->ip_off & htons(0x1fff)) { /* Can't deal w/ fragments */ |
1408 | 1408 | return; |
1409 | 1409 | } |
1410 | + /* can't deal with headers > 20 bytes */ | |
1411 | + if ((ip->ip_hl_v & 0x0f) > 0x05) { | |
1412 | + return; | |
1413 | + } | |
1410 | 1414 | if (!NetCksumOk((uchar *)ip, IP_HDR_SIZE_NO_UDP / 2)) { |
1411 | 1415 | puts ("checksum bad\n"); |
1412 | 1416 | return; |