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 $
9 # REQUIRE: netif ppp-user
14 start_cmd
="routing_start"
15 stop_cmd
="routing_stop"
16 extra_commands
="options static change"
17 static_cmd
="static_start"
18 change_cmd
="change_start"
19 options_cmd
="options_start"
35 case ${defaultrouter} in
39 static_routes
="default ${static_routes}"
40 route_default
="default ${defaultrouter}"
44 # Setup static routes. This should be done before router discovery.
46 if [ -n "${static_routes}" ]; then
47 for i
in ${static_routes}; do
48 eval route_args
=\
$route_${i}
49 route add
${route_args}
56 # Change routes. This should be done before router discovery.
58 if [ -n "${change_routes}" ]; then
59 for i
in ${change_routes}; do
60 eval route_args
=\
$change_route_${i}
61 route change
${route_args}
68 echo -n 'Additional routing options:'
69 case ${tcp_extensions} in
73 echo -n ' tcp extensions=NO'
74 sysctl net.inet.tcp.rfc1323
=0 >/dev
/null
78 case ${icmp_bmcastecho} in
80 echo -n ' broadcast ping responses=YES'
81 sysctl net.inet.icmp.bmcastecho
=1 >/dev
/null
85 case ${icmp_drop_redirect} in
87 echo -n ' ignore ICMP redirect=YES'
88 sysctl net.inet.icmp.drop_redirect
=1 >/dev
/null
92 case ${icmp_log_redirect} in
94 echo -n ' log ICMP redirect=YES'
95 sysctl net.inet.icmp.log_redirect
=1 >/dev
/null
99 case ${gateway_enable} in
101 echo -n ' IP gateway=YES'
102 sysctl net.inet.ip.forwarding
=1 >/dev
/null
106 case ${forward_sourceroute} in
108 echo -n ' do source routing=YES'
109 sysctl net.inet.ip.sourceroute
=1 >/dev
/null
113 case ${accept_sourceroute} in
115 echo -n ' accept source routing=YES'
116 sysctl net.inet.ip.accept_sourceroute
=1 >/dev
/null
120 case ${tcp_keepalive} in
122 echo -n ' TCP keepalive=NO'
123 sysctl net.inet.tcp.always_keepalive
=0 >/dev
/null
127 case ${tcp_drop_synfin} in
129 echo -n ' drop SYN+FIN packets=YES'
130 sysctl net.inet.tcp.drop_synfin
=1 >/dev
/null
134 case ${arpproxy_all} in
136 echo -n ' ARP proxyall=YES'
137 sysctl net.link.ether.inet.proxyall
=1 >/dev
/null
141 case ${ip_portrange_first} in
145 echo -n " ip_portrange_first=$ip_portrange_first"
146 sysctl net.inet.ip.portrange.first
=$ip_portrange_first >/dev
/null
150 case ${ip_portrange_last} in
154 echo -n " ip_portrange_last=$ip_portrange_last"
155 sysctl net.inet.ip.portrange.last
=$ip_portrange_last >/dev
/null