ipv6: log src and dst along with "udp checksum is 0"
authorBjørn Mork <bjorn@mork.no>
Tue, 25 Feb 2014 20:11:02 +0000 (21:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Feb 2014 20:46:25 +0000 (15:46 -0500)
These info messages are rather pointless without any means to identify
the source of the bogus packets.  Logging the src and dst addresses and
ports may help a bit.

Cc: Joe Perches <joe@perches.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_checksum.c

index 72d198b8e4d2966d81fc5c183b12333e49e56d3f..ee7a97f510cbd9f94fa24eafa43ddba201c75f3e 100644 (file)
@@ -79,7 +79,9 @@ int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh, int proto)
                /* RFC 2460 section 8.1 says that we SHOULD log
                   this error. Well, it is reasonable.
                 */
-               LIMIT_NETDEBUG(KERN_INFO "IPv6: udp checksum is 0\n");
+               LIMIT_NETDEBUG(KERN_INFO "IPv6: udp checksum is 0 for [%pI6c]:%u->[%pI6c]:%u\n",
+                              &ipv6_hdr(skb)->saddr, ntohs(uh->source),
+                              &ipv6_hdr(skb)->daddr, ntohs(uh->dest));
                return 1;
        }
        if (skb->ip_summed == CHECKSUM_COMPLETE &&