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"
18 static_cmd="static_start"
19 options_cmd="options_start"
34 case ${defaultrouter} in
38 static_routes="default ${static_routes}"
39 route_default="default ${defaultrouter}"
43 # Setup static routes. This should be done before router discovery.
45 if [ -n "${static_routes}" ]; then
46 for i in ${static_routes}; do
47 eval route_args=\$route_${i}
48 route add ${route_args}
55 echo -n 'Additional routing options:'
56 case ${tcp_extensions} in
60 echo -n ' tcp extensions=NO'
61 sysctl net.inet.tcp.rfc1323=0 >/dev/null
65 case ${icmp_bmcastecho} in
67 echo -n ' broadcast ping responses=YES'
68 sysctl net.inet.icmp.bmcastecho=1 >/dev/null
72 case ${icmp_drop_redirect} in
74 echo -n ' ignore ICMP redirect=YES'
75 sysctl net.inet.icmp.drop_redirect=1 >/dev/null
79 case ${icmp_log_redirect} in
81 echo -n ' log ICMP redirect=YES'
82 sysctl net.inet.icmp.log_redirect=1 >/dev/null
86 case ${gateway_enable} in
88 echo -n ' IP gateway=YES'
89 sysctl net.inet.ip.forwarding=1 >/dev/null
93 case ${forward_sourceroute} in
95 echo -n ' do source routing=YES'
96 sysctl net.inet.ip.sourceroute=1 >/dev/null
100 case ${accept_sourceroute} in
102 echo -n ' accept source routing=YES'
103 sysctl net.inet.ip.accept_sourceroute=1 >/dev/null
107 case ${tcp_keepalive} in
109 echo -n ' TCP keepalive=NO'
110 sysctl net.inet.tcp.always_keepalive=0 >/dev/null
114 case ${tcp_drop_synfin} in
116 echo -n ' drop SYN+FIN packets=YES'
117 sysctl net.inet.tcp.drop_synfin=1 >/dev/null
121 case ${ipxgateway_enable} in
123 echo -n ' IPX gateway=YES'
124 sysctl net.ipx.ipx.ipxforwarding=1 >/dev/null
128 case ${arpproxy_all} in
130 echo -n ' ARP proxyall=YES'
131 sysctl net.link.ether.inet.proxyall=1 >/dev/null
135 case ${ip_portrange_first} in
139 echo -n " ip_portrange_first=$ip_portrange_first"
140 sysctl net.inet.ip.portrange.first=$ip_portrange_first >/dev/null
144 case ${ip_portrange_last} in
148 echo -n " ip_portrange_last=$ip_portrange_last"
149 sysctl net.inet.ip.portrange.last=$ip_portrange_last >/dev/null