diff options
author | guido <guido@FreeBSD.org> | 1998-02-16 19:21:32 +0000 |
---|---|---|
committer | guido <guido@FreeBSD.org> | 1998-02-16 19:21:32 +0000 |
commit | 620810fd0c96fb2b15a15ba8c21d11892452e1d8 (patch) | |
tree | fab732f6436faa02abe9a7619720f886b19223c4 /etc | |
parent | 977c976366588ba7b89384d4c3c0d1260ca46ac7 (diff) | |
download | FreeBSD-src-620810fd0c96fb2b15a15ba8c21d11892452e1d8.zip FreeBSD-src-620810fd0c96fb2b15a15ba8c21d11892452e1d8.tar.gz |
Add 2 new rc.conf variables:
forward_sourceroute : controls setting of existing net.inet.ip.sourceroute
accept_sourceroute : control setting of new net.inet.ip.accept_sourceroute
Diffstat (limited to 'etc')
-rw-r--r-- | etc/network.subr | 12 | ||||
-rw-r--r-- | etc/rc.conf | 4 | ||||
-rw-r--r-- | etc/rc.d/netoptions | 12 | ||||
-rw-r--r-- | etc/rc.d/network1 | 12 | ||||
-rw-r--r-- | etc/rc.d/network2 | 12 | ||||
-rw-r--r-- | etc/rc.d/network3 | 12 | ||||
-rw-r--r-- | etc/rc.d/routing | 12 | ||||
-rw-r--r-- | etc/rc.network | 12 |
8 files changed, 80 insertions, 8 deletions
diff --git a/etc/network.subr b/etc/network.subr index cdc35bf..a66013b 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.16 1998/02/07 04:56:56 alex Exp $ +# $Id: rc.network,v 1.17 1998/02/14 04:12:23 alex Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -117,6 +117,16 @@ network_pass1() { sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 fi + if [ "X$forward_sourceroute" = X"YES" ]; then + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 + fi + + if [ "X$accept_sourceroute" = X"YES" ]; then + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 + fi + if [ "X$router_enable" = X"YES" ]; then echo -n " ${router}"; ${router} ${router_flags} fi diff --git a/etc/rc.conf b/etc/rc.conf index 57561be..fe64128 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -6,7 +6,7 @@ # # All arguments must be in double or single quotes. # -# $Id: rc.conf,v 1.36 1997/12/27 19:46:54 steve Exp $ +# $Id: rc.conf,v 1.37 1998/02/01 00:20:53 wollman Exp $ ############################################################## ### Important initial Boot-time options ##################### @@ -99,6 +99,8 @@ ipxgateway_enable="NO" # Set to YES to enable IPX routing. ipxrouted_enable="NO" # Set to YES to run the IPX routing daemon. ipxrouted_flags="" # Flags for IPX routing daemon. arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL. +forward_sourceroute="NO" # do source routing (only if gateway_enable is set to "YES" +accept_sourceroute="NO" # accept source routed packets to us ############################################################## diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index cdc35bf..a66013b 100644 --- a/etc/rc.d/netoptions +++ b/etc/rc.d/netoptions @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.16 1998/02/07 04:56:56 alex Exp $ +# $Id: rc.network,v 1.17 1998/02/14 04:12:23 alex Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -117,6 +117,16 @@ network_pass1() { sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 fi + if [ "X$forward_sourceroute" = X"YES" ]; then + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 + fi + + if [ "X$accept_sourceroute" = X"YES" ]; then + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 + fi + if [ "X$router_enable" = X"YES" ]; then echo -n " ${router}"; ${router} ${router_flags} fi diff --git a/etc/rc.d/network1 b/etc/rc.d/network1 index cdc35bf..a66013b 100644 --- a/etc/rc.d/network1 +++ b/etc/rc.d/network1 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.16 1998/02/07 04:56:56 alex Exp $ +# $Id: rc.network,v 1.17 1998/02/14 04:12:23 alex Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -117,6 +117,16 @@ network_pass1() { sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 fi + if [ "X$forward_sourceroute" = X"YES" ]; then + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 + fi + + if [ "X$accept_sourceroute" = X"YES" ]; then + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 + fi + if [ "X$router_enable" = X"YES" ]; then echo -n " ${router}"; ${router} ${router_flags} fi diff --git a/etc/rc.d/network2 b/etc/rc.d/network2 index cdc35bf..a66013b 100644 --- a/etc/rc.d/network2 +++ b/etc/rc.d/network2 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.16 1998/02/07 04:56:56 alex Exp $ +# $Id: rc.network,v 1.17 1998/02/14 04:12:23 alex Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -117,6 +117,16 @@ network_pass1() { sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 fi + if [ "X$forward_sourceroute" = X"YES" ]; then + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 + fi + + if [ "X$accept_sourceroute" = X"YES" ]; then + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 + fi + if [ "X$router_enable" = X"YES" ]; then echo -n " ${router}"; ${router} ${router_flags} fi diff --git a/etc/rc.d/network3 b/etc/rc.d/network3 index cdc35bf..a66013b 100644 --- a/etc/rc.d/network3 +++ b/etc/rc.d/network3 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.16 1998/02/07 04:56:56 alex Exp $ +# $Id: rc.network,v 1.17 1998/02/14 04:12:23 alex Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -117,6 +117,16 @@ network_pass1() { sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 fi + if [ "X$forward_sourceroute" = X"YES" ]; then + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 + fi + + if [ "X$accept_sourceroute" = X"YES" ]; then + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 + fi + if [ "X$router_enable" = X"YES" ]; then echo -n " ${router}"; ${router} ${router_flags} fi diff --git a/etc/rc.d/routing b/etc/rc.d/routing index cdc35bf..a66013b 100644 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.16 1998/02/07 04:56:56 alex Exp $ +# $Id: rc.network,v 1.17 1998/02/14 04:12:23 alex Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -117,6 +117,16 @@ network_pass1() { sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 fi + if [ "X$forward_sourceroute" = X"YES" ]; then + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 + fi + + if [ "X$accept_sourceroute" = X"YES" ]; then + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 + fi + if [ "X$router_enable" = X"YES" ]; then echo -n " ${router}"; ${router} ${router_flags} fi diff --git a/etc/rc.network b/etc/rc.network index cdc35bf..a66013b 100644 --- a/etc/rc.network +++ b/etc/rc.network @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: rc.network,v 1.16 1998/02/07 04:56:56 alex Exp $ +# $Id: rc.network,v 1.17 1998/02/14 04:12:23 alex Exp $ # From: @(#)netstart 5.9 (Berkeley) 3/30/91 # Note that almost all the user-configurable behavior is no longer in @@ -117,6 +117,16 @@ network_pass1() { sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 fi + if [ "X$forward_sourceroute" = X"YES" ]; then + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 + fi + + if [ "X$accept_sourceroute" = X"YES" ]; then + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 + fi + if [ "X$router_enable" = X"YES" ]; then echo -n " ${router}"; ${router} ${router_flags} fi |