Skip to content

Commit

Permalink
[IPV4]: Apply sysctl_icmp_echo_ignore_broadcasts to ICMP_TIMESTAMP as…
Browse files Browse the repository at this point in the history
… well.

This was the full intention of the original code.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexey Kuznetsov authored and David S. Miller committed Jul 9, 2005
1 parent 86a76ca commit 4c866aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4c866aa

Please sign in to comment.