Re: [PATCH] make icmp.c be more verbose on broadcast icmp errors

From: James Morris (jmorris@intercode.com.au)
Date: Mon May 26 2003 - 01:16:14 EST


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@xxxxxxxxxxxxxxxx>

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