diff --git a/etc/network.subr b/etc/network.subr index cdc35bfd7229..a66013b774ff 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 57561beeb914..fe641284e632 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 cdc35bfd7229..a66013b774ff 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 cdc35bfd7229..a66013b774ff 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 cdc35bfd7229..a66013b774ff 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 cdc35bfd7229..a66013b774ff 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 cdc35bfd7229..a66013b774ff 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 cdc35bfd7229..a66013b774ff 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