diff options
author | jkoshy <jkoshy@FreeBSD.org> | 1998-09-15 10:49:03 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 1998-09-15 10:49:03 +0000 |
commit | ed7cc860374c899ac82fe41832afd84295494cc8 (patch) | |
tree | cbe84db3ab3ab9964a2736ffbce22906901c9e50 /etc/rc.d | |
parent | 79200df6729d1afbc24596e05c0bee54a2544616 (diff) | |
download | FreeBSD-src-ed7cc860374c899ac82fe41832afd84295494cc8.zip FreeBSD-src-ed7cc860374c899ac82fe41832afd84295494cc8.tar.gz |
Turn off replies to ICMP echo requests for broadcast and multicast
addresses by default.
Add a knob "icmp_bmcastecho" to "rc.network" to allow this
behaviour to be controlled from "rc.conf".
Document the controlling sysctl variable "net.inet.icmp.bmcastecho"
in sysctl(3).
Reviewed by: dg, jkh
Reminded on -hackers by: Steinar Haug <sthaug@nethelp.no>
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/netoptions | 7 | ||||
-rw-r--r-- | etc/rc.d/network1 | 7 | ||||
-rw-r--r-- | etc/rc.d/network2 | 7 | ||||
-rw-r--r-- | etc/rc.d/network3 | 7 | ||||
-rw-r--r-- | etc/rc.d/routing | 7 |
5 files changed, 30 insertions, 5 deletions
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index 526cf3c..f807a89 100644 --- a/etc/rc.d/netoptions +++ b/etc/rc.d/netoptions @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.29 1998/08/14 06:55:17 phk Exp $ +# $Id: rc.network,v 1.30 1998/09/06 08:20:11 phk Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -110,6 +110,11 @@ network_pass1() { sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 fi + if [ X"$icmp_bmcastecho" = X"YES" ]; then + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 + fi + if [ "X$gateway_enable" = X"YES" ]; then echo -n ' IP gateway=YES' sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 diff --git a/etc/rc.d/network1 b/etc/rc.d/network1 index 526cf3c..f807a89 100644 --- a/etc/rc.d/network1 +++ b/etc/rc.d/network1 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.29 1998/08/14 06:55:17 phk Exp $ +# $Id: rc.network,v 1.30 1998/09/06 08:20:11 phk Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -110,6 +110,11 @@ network_pass1() { sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 fi + if [ X"$icmp_bmcastecho" = X"YES" ]; then + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 + fi + if [ "X$gateway_enable" = X"YES" ]; then echo -n ' IP gateway=YES' sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 diff --git a/etc/rc.d/network2 b/etc/rc.d/network2 index 526cf3c..f807a89 100644 --- a/etc/rc.d/network2 +++ b/etc/rc.d/network2 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.29 1998/08/14 06:55:17 phk Exp $ +# $Id: rc.network,v 1.30 1998/09/06 08:20:11 phk Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -110,6 +110,11 @@ network_pass1() { sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 fi + if [ X"$icmp_bmcastecho" = X"YES" ]; then + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 + fi + if [ "X$gateway_enable" = X"YES" ]; then echo -n ' IP gateway=YES' sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 diff --git a/etc/rc.d/network3 b/etc/rc.d/network3 index 526cf3c..f807a89 100644 --- a/etc/rc.d/network3 +++ b/etc/rc.d/network3 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.29 1998/08/14 06:55:17 phk Exp $ +# $Id: rc.network,v 1.30 1998/09/06 08:20:11 phk Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -110,6 +110,11 @@ network_pass1() { sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 fi + if [ X"$icmp_bmcastecho" = X"YES" ]; then + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 + fi + if [ "X$gateway_enable" = X"YES" ]; then echo -n ' IP gateway=YES' sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 526cf3c..f807a89 100644 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.29 1998/08/14 06:55:17 phk Exp $ +# $Id: rc.network,v 1.30 1998/09/06 08:20:11 phk Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -110,6 +110,11 @@ network_pass1() { sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 fi + if [ X"$icmp_bmcastecho" = X"YES" ]; then + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 + fi + if [ "X$gateway_enable" = X"YES" ]; then echo -n ' IP gateway=YES' sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 |