From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Date: Sat, 9 Jul 2005 00:34:46 +0000 (-0700)
Subject: [IPV4]: Apply sysctl_icmp_echo_ignore_broadcasts to ICMP_TIMESTAMP as well.
X-Git-Tag: v2.6.13-rc3~110
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4c866aa798bc6de0a1d45495229e9f13c35b55c2;p=linux-2.6-omap-h63xx.git

[IPV4]: Apply sysctl_icmp_echo_ignore_broadcasts to ICMP_TIMESTAMP as well.

This was the full intention of the original code.

Signed-off-by: David S. Miller <davem@davemloft.net>
---

diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index cb759484979..279f57abfec 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -970,7 +970,8 @@ int icmp_rcv(struct sk_buff *skb)
 		 *	RFC 1122: 3.2.2.8 An ICMP_TIMESTAMP MAY be silently
 		 *	  discarded if to broadcast/multicast.
 		 */
-		if (icmph->type == ICMP_ECHO &&
+		if ((icmph->type == ICMP_ECHO ||
+		     icmph->type == ICMP_TIMESTAMP) &&
 		    sysctl_icmp_echo_ignore_broadcasts) {
 			goto error;
 		}