3 # Configure routing and miscellaneous network tunables
5 # $FreeBSD: src/etc/rc.d/routing,v 1.138 2003/06/29 17:59:09 mtm Exp $
6 # $DragonFly: src/etc/rc.d/routing,v 1.3 2005/11/19 21:47:32 swildner Exp $
10 # REQUIRE: netif ppp-user
15 start_cmd
="routing_start"
16 stop_cmd
="routing_stop"
17 extra_commands
="options static change"
18 static_cmd
="static_start"
19 change_cmd
="change_start"
20 options_cmd
="options_start"
36 case ${defaultrouter} in
40 static_routes
="default ${static_routes}"
41 route_default
="default ${defaultrouter}"
45 # Setup static routes. This should be done before router discovery.
47 if [ -n "${static_routes}" ]; then
48 for i
in ${static_routes}; do
49 eval route_args
=\
$route_${i}
50 route add
${route_args}
57 # Change routes. This should be done before router discovery.
59 if [ -n "${change_routes}" ]; then
60 for i
in ${change_routes}; do
61 eval route_args
=\
$change_route_${i}
62 route change
${route_args}
69 echo -n 'Additional routing options:'
70 case ${tcp_extensions} in
74 echo -n ' tcp extensions=NO'
75 sysctl net.inet.tcp.rfc1323
=0 >/dev
/null
79 case ${icmp_bmcastecho} in
81 echo -n ' broadcast ping responses=YES'
82 sysctl net.inet.icmp.bmcastecho
=1 >/dev
/null
86 case ${icmp_drop_redirect} in
88 echo -n ' ignore ICMP redirect=YES'
89 sysctl net.inet.icmp.drop_redirect
=1 >/dev
/null
93 case ${icmp_log_redirect} in
95 echo -n ' log ICMP redirect=YES'
96 sysctl net.inet.icmp.log_redirect
=1 >/dev
/null
100 case ${gateway_enable} in
102 echo -n ' IP gateway=YES'
103 sysctl net.inet.ip.forwarding
=1 >/dev
/null
107 case ${forward_sourceroute} in
109 echo -n ' do source routing=YES'
110 sysctl net.inet.ip.sourceroute
=1 >/dev
/null
114 case ${accept_sourceroute} in
116 echo -n ' accept source routing=YES'
117 sysctl net.inet.ip.accept_sourceroute
=1 >/dev
/null
121 case ${tcp_keepalive} in
123 echo -n ' TCP keepalive=NO'
124 sysctl net.inet.tcp.always_keepalive
=0 >/dev
/null
128 case ${tcp_drop_synfin} in
130 echo -n ' drop SYN+FIN packets=YES'
131 sysctl net.inet.tcp.drop_synfin
=1 >/dev
/null
135 case ${ipxgateway_enable} in
137 echo -n ' IPX gateway=YES'
138 sysctl net.ipx.ipx.ipxforwarding
=1 >/dev
/null
142 case ${arpproxy_all} in
144 echo -n ' ARP proxyall=YES'
145 sysctl net.link.ether.inet.proxyall
=1 >/dev
/null
149 case ${ip_portrange_first} in
153 echo -n " ip_portrange_first=$ip_portrange_first"
154 sysctl net.inet.ip.portrange.first
=$ip_portrange_first >/dev
/null
158 case ${ip_portrange_last} in
162 echo -n " ip_portrange_last=$ip_portrange_last"
163 sysctl net.inet.ip.portrange.last
=$ip_portrange_last >/dev
/null