Re: UDP bad checksum

Simon Weijgers (s.weijgers@net.hcc.nl)
Sun, 6 Sep 1998 11:35:43 +0200 (CEST)


On Fri, 4 Sep 1998, Samuli Kaski wrote:

> Sep 4 23:34:58 vortex kernel: UDP: bad checksum. From C3EEC00B:53 to C3C52261:1033 ulen 198
>
> Never seen that before... maybe it should be changed to decimal? And the
> ports are still hex in the TCPv4 bad checksums... do I have to make a
> patch myself to get it corrected?! :)

Here you go...

--- udp_old.c Fri Jun 12 07:52:35 1998
+++ udp.c Sun Sep 6 11:26:14 1998
@@ -1139,10 +1139,19 @@
/* RFC1122: OK. Discards the bad packet silently (as far as */
/* the network is concerned, anyway) as per 4.1.3.4 (MUST). */

- NETDEBUG(printk(KERN_DEBUG "UDP: bad checksum. From %08lX:%d to %08lX:%d ulen %d\n",
- ntohl(saddr),ntohs(uh->source),
- ntohl(daddr),ntohs(uh->dest),
- ulen));
+ NETDEBUG(printk(KERN_DEBUG "UDP: bad checksum. From %d.%d.%d.%d:%d to %d.%d.%d.%d:%d ulen %d\n",
+ (ntohl(saddr)>>24)&0xff,
+ (ntohl(saddr)>>16)&0xff,
+ (ntohl(saddr)>>8)&0xff,
+ ntohl(saddr)&0xff,
+ ntohs(uh->source),
+ (ntohl(daddr)>>24)&0xff,
+ (ntohl(daddr)>>16)&0xff,
+ (ntohl(daddr)>>8)&0xff,
+ ntohl(daddr)&0xff,
+ ntohs(uh->dest),
+ ulen));
+
udp_statistics.UdpInErrors++;
kfree_skb(skb);
return(0);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/faq.html