* [PATCH] make icmp.c be more verbose on broadcast icmp errors
@ 2003-05-23 10:55 Maciej Soltysiak
2003-05-26 4:14 ` David S. Miller
2003-05-26 6:12 ` James Morris
0 siblings, 2 replies; 5+ messages in thread
From: Maciej Soltysiak @ 2003-05-23 10:55 UTC (permalink / raw)
To: davem; +Cc: Eric.Schenk, linux-kernel
Hi,
I noticed today in my logs something like:
1.2.3.4 sent an invalid ICMP error to a broadcast address.
And i though that it would be nice to make it report what code/type was
it. So here goes:
2.5 version:
diff -Nru linux-2.5.69.bak/net/ipv4/icmp.c linux-2.5.68/net/ipv4/icmp.c
--- linux-2.5.69.bak/net/ipv4/icmp.c 2003-05-17 14:56:11.000000000 +0200
+++ linux-2.5.69/net/ipv4/icmp.c 2003-05-23 12:15:45.000000000 +0200
@@ -663,8 +659,10 @@
inet_addr_type(iph->daddr) == RTN_BROADCAST) {
if (net_ratelimit())
printk(KERN_WARNING "%u.%u.%u.%u sent an invalid ICMP "
+ "type %u, code %u "
"error to a broadcast.\n",
- NIPQUAD(skb->nh.iph->saddr));
+ NIPQUAD(skb->nh.iph->saddr),
+ icmph->type, icmph->code);
goto out;
}
2.4 Version:
diff -Nru linux.bak/net/ipv4/icmp.c linux/net/ipv4/icmp.c
--- linux.bak/net/ipv4/icmp.c 2003-04-30 15:57:40.000000000 +0200
+++ linux/net/ipv4/icmp.c 2003-05-23 12:20:46.000000000 +0200
@@ -625,8 +595,9 @@
if (inet_addr_type(iph->daddr) == RTN_BROADCAST)
{
if (net_ratelimit())
- printk(KERN_WARNING "%u.%u.%u.%u sent an invalid ICMP error to a broadcast.\n",
- NIPQUAD(skb->nh.iph->saddr));
+ printk(KERN_WARNING "%u.%u.%u.%u sent an invalid ICMP type %u, code %u error to a broadcast.\n",
+ NIPQUAD(skb->nh.iph->saddr),
+ icmph->type, icmph->code);
goto out;
}
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make icmp.c be more verbose on broadcast icmp errors
2003-05-23 10:55 [PATCH] make icmp.c be more verbose on broadcast icmp errors Maciej Soltysiak
@ 2003-05-26 4:14 ` David S. Miller
2003-05-26 5:56 ` Christoph Hellwig
2003-05-26 6:12 ` James Morris
1 sibling, 1 reply; 5+ messages in thread
From: David S. Miller @ 2003-05-26 4:14 UTC (permalink / raw)
To: Maciej Soltysiak; +Cc: davem, Eric.Schenk, linux-kernel
None of the people on the CC: list maintain the networking
code, I have no idea where you've obtained that outdated
contact information. Eric hasn't done networking work for
at least 4 or 5 years, and it's been a similarly long time
since I've ever used that old rutgers.edu address for myself.
Also, linux-kernel is not the place for networking patches
and discussion, linux-net and netdev are.
--
David S. Miller <davem@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make icmp.c be more verbose on broadcast icmp errors
2003-05-26 4:14 ` David S. Miller
@ 2003-05-26 5:56 ` Christoph Hellwig
2003-05-26 5:59 ` David S. Miller
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2003-05-26 5:56 UTC (permalink / raw)
To: David S. Miller; +Cc: Maciej Soltysiak, davem, Eric.Schenk, linux-kernel
On Sun, May 25, 2003 at 09:14:04PM -0700, David S. Miller wrote:
> None of the people on the CC: list maintain the networking
> code, I have no idea where you've obtained that outdated
> contact information. Eric hasn't done networking work for
> at least 4 or 5 years, and it's been a similarly long time
> since I've ever used that old rutgers.edu address for myself.
net/README:
---- snip ----
ipv4 davem@caip.rutgers.edu,Eric.Schenk@dna.lth.se
ipv6 davem@caip.rutgers.edu,Eric.Schenk@dna.lth.se
---- snip ----
probably this file should be removed completly - it's horribly outdated
and we have MAINTAINERS for that purpose..
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make icmp.c be more verbose on broadcast icmp errors
2003-05-26 5:56 ` Christoph Hellwig
@ 2003-05-26 5:59 ` David S. Miller
0 siblings, 0 replies; 5+ messages in thread
From: David S. Miller @ 2003-05-26 5:59 UTC (permalink / raw)
To: hch; +Cc: solt, davem, Eric.Schenk, linux-kernel
From: Christoph Hellwig <hch@infradead.org>
Date: Mon, 26 May 2003 06:56:02 +0100
net/README:
...
probably this file should be removed completly - it's horribly outdated
and we have MAINTAINERS for that purpose..
Oh yes, let's kill that thing :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make icmp.c be more verbose on broadcast icmp errors
2003-05-23 10:55 [PATCH] make icmp.c be more verbose on broadcast icmp errors Maciej Soltysiak
2003-05-26 4:14 ` David S. Miller
@ 2003-05-26 6:12 ` James Morris
1 sibling, 0 replies; 5+ messages in thread
From: James Morris @ 2003-05-26 6:12 UTC (permalink / raw)
To: Maciej Soltysiak; +Cc: linux-kernel, David S. Miller
On Fri, 23 May 2003, Maciej Soltysiak wrote:
> if (net_ratelimit())
> printk(KERN_WARNING "%u.%u.%u.%u sent an invalid ICMP "
> + "type %u, code %u "
> "error to a broadcast.\n",
> - NIPQUAD(skb->nh.iph->saddr));
> + NIPQUAD(skb->nh.iph->saddr),
> + icmph->type, icmph->code);
> if (net_ratelimit())
> - printk(KERN_WARNING "%u.%u.%u.%u sent an invalid ICMP error to a broadcast.\n",
> - NIPQUAD(skb->nh.iph->saddr));
> + printk(KERN_WARNING "%u.%u.%u.%u sent an invalid ICMP type %u, code %u error to a broadcast.\n",
> + NIPQUAD(skb->nh.iph->saddr),
> + icmph->type, icmph->code);
Perhaps make this a static inline, icmp_warn_invalid() or similar.
- James
--
James Morris
<jmorris@intercode.com.au>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-05-26 5:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-23 10:55 [PATCH] make icmp.c be more verbose on broadcast icmp errors Maciej Soltysiak
2003-05-26 4:14 ` David S. Miller
2003-05-26 5:56 ` Christoph Hellwig
2003-05-26 5:59 ` David S. Miller
2003-05-26 6:12 ` James Morris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).