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.2 2004/01/27 00:42:45 rob Exp $
10 # REQUIRE: netif ppp-user
16 start_cmd="routing_start"
17 stop_cmd="routing_stop"
18 extra_commands="options static"
19 static_cmd="static_start"
20 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 echo -n 'Additional routing options:'
57 case ${tcp_extensions} in
61 echo -n ' tcp extensions=NO'
62 sysctl net.inet.tcp.rfc1323=0 >/dev/null
66 case ${icmp_bmcastecho} in
68 echo -n ' broadcast ping responses=YES'
69 sysctl net.inet.icmp.bmcastecho=1 >/dev/null
73 case ${icmp_drop_redirect} in
75 echo -n ' ignore ICMP redirect=YES'
76 sysctl net.inet.icmp.drop_redirect=1 >/dev/null
80 case ${icmp_log_redirect} in
82 echo -n ' log ICMP redirect=YES'
83 sysctl net.inet.icmp.log_redirect=1 >/dev/null
87 case ${gateway_enable} in
89 echo -n ' IP gateway=YES'
90 sysctl net.inet.ip.forwarding=1 >/dev/null
94 case ${forward_sourceroute} in
96 echo -n ' do source routing=YES'
97 sysctl net.inet.ip.sourceroute=1 >/dev/null
101 case ${accept_sourceroute} in
103 echo -n ' accept source routing=YES'
104 sysctl net.inet.ip.accept_sourceroute=1 >/dev/null
108 case ${tcp_keepalive} in
110 echo -n ' TCP keepalive=NO'
111 sysctl net.inet.tcp.always_keepalive=0 >/dev/null
115 case ${tcp_drop_synfin} in
117 echo -n ' drop SYN+FIN packets=YES'
118 sysctl net.inet.tcp.drop_synfin=1 >/dev/null
122 case ${ipxgateway_enable} in
124 echo -n ' IPX gateway=YES'
125 sysctl net.ipx.ipx.ipxforwarding=1 >/dev/null
129 case ${arpproxy_all} in
131 echo -n ' ARP proxyall=YES'
132 sysctl net.link.ether.inet.proxyall=1 >/dev/null
136 case ${ip_portrange_first} in
140 echo -n " ip_portrange_first=$ip_portrange_first"
141 sysctl net.inet.ip.portrange.first=$ip_portrange_first >/dev/null
145 case ${ip_portrange_last} in
149 echo -n " ip_portrange_last=$ip_portrange_last"
150 sysctl net.inet.ip.portrange.last=$ip_portrange_last >/dev/null