[PATCH] Option to suppress annoying "x.x.x.x sent an invalid ICMP

Greaves Tristan TM (Tristan.Greaves@icl.com)
Thu, 12 Nov 1998 13:20:06 -0000


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01BE0E3F.2A89A0C6
Content-Type: text/plain;
charset="iso-8859-1"

[re-sending - didn't appear to make it to the list last time, and also
looking for more comments!]

Linus,

It is known that some routers are not RFC 1122 compliant, and send out
bogus error respones to invalid broadcasts.

Later Linux kernels detect this, printing a kernel message.

This is great as a diagnostic tool, but extremely annoying when your
console gets about 10 of these every minute. ;)

Presently, there is no kernel option to turn off these options. This
patch gives that option - It is made against 2.1.127.

Files patched:

linux/net/ipv4/icmp.c
linux/net/ipv4/Config.in
linux/Documentation/Configure.help

Admittedly, the ideal situation is to fix the router, but if this isn't an
immediate option, there needs to be a way to stop those messages from
appearing. :)

The patch gives the option:

IP: Ignore bogus broadcast responses from routers

... in the kernel configuration. It defaults to "N", so only users that
are fed up with the error message appearing need to use it.

I hope this is of help.

Thanks,

Tris.

---
Tristan Greaves                        (Systems Integrator) 
Enterprise Solutions                 
ICL                                  Tel: +44 (0)1344 472512 
Lovelace Road                     Mobile: +44 (0)7970 194624 
Bracknell RG12 8SN                  Mail: Tristan.Greaves@icl.com
  

------_=_NextPart_000_01BE0E3F.2A89A0C6 Content-Type: application/octet-stream; name="ignore_bogus_broadcasts.2.1.127.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ignore_bogus_broadcasts.2.1.127.patch" Content-Location: ATT-0-933C16511A7AD211882B00A0C984DC86-I GNOR%7EHO.PAT

--- linux/Documentation/Configure.help.orig Wed Nov 11 17:52:03 1998=0A= +++ linux/Documentation/Configure.help Wed Nov 11 16:41:15 1998=0A= @@ -1065,6 +1065,20 @@=0A= =0A= If unsure, say Y.=0A= =0A= +Ignore bogus broadcast reponses from routers=0A= +CONFIG_IP_IGNORE_BOGUS_BROADCAST_RESPONSES=0A= + Some routers violate RFC 1122 by sending bogus responses to=0A= + broadcast frames.=0A= +=0A= + Normally, you should have this option set to N so that you = receive=0A= + kernel messages when this occurs.=0A= +=0A= + However, if it is happening and the broken router is out of your=0A= + control, you may wish to answer Y so that the messages do not = flood=0A= + your logs.=0A= +=0A= + If unsure, say N.=0A= +=0A= Sun floppy controller support=0A= CONFIG_BLK_DEV_SUNFD=0A= This is support for floppy drives on Sun SPARC workstations. Say = Y=0A= --- linux/net/ipv4/Config.in.orig Wed Nov 11 16:46:54 1998=0A= +++ linux/net/ipv4/Config.in Wed Nov 11 16:47:43 1998=0A= @@ -70,6 +70,7 @@=0A= fi=0A= fi=0A= bool 'IP: TCP syncookie support (not enabled per default) ' = CONFIG_SYN_COOKIES=0A= +bool 'IP: Ignore bogus broadcast responses from routers ' = CONFIG_IP_IGNORE_BOGUS_BROADCAST_RESPONSES=0A= comment '(it is safe to leave these untouched)'=0A= #bool 'IP: PC/TCP compatibility mode' CONFIG_INET_PCTCP=0A= tristate 'IP: Reverse ARP' CONFIG_INET_RARP=0A= --- linux/net/ipv4/icmp.c.orig Wed Nov 11 16:42:17 1998=0A= +++ linux/net/ipv4/icmp.c Wed Nov 11 16:46:14 1998=0A= @@ -50,6 +50,8 @@=0A= * Yu Tianli : Fixed two ugly bugs in icmp_send=0A= * - IP option length was accounted wrongly=0A= * - ICMP header length was not accounted at all.=0A= + * Tristan Greaves : Added option to ignore bogus = broadcast=0A= + * responses from broken = routers.=0A= *=0A= * To Fix:=0A= *=0A= @@ -701,7 +703,8 @@=0A= * first check your netmask matches at both ends, if it does then=0A= * get the other vendor to fix their kit.=0A= */=0A= - =0A= + =0A= +#ifndef CONFIG_IP_IGNORE_BOGUS_BROADCAST_RESPONSES =0A= if (inet_addr_type(iph->daddr) =3D=3D RTN_BROADCAST)=0A= {=0A= if (net_ratelimit())=0A= @@ -709,7 +712,7 @@=0A= in_ntoa(skb->nh.iph->saddr));=0A= return; =0A= }=0A= -=0A= +#endif=0A= =0A= /*=0A= * Deliver ICMP message to raw sockets. Pretty useless feature?=0A=

------_=_NextPart_000_01BE0E3F.2A89A0C6--

- 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/