3 # Configure routing and miscellaneous network tunables
9 # REQUIRE: netif ppp-user
10 # KEYWORD: FreeBSD nojail
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}
51 # Now ATM static routes
53 if [ -n "${natm_static_routes}" ]; then
54 for i in ${natm_static_routes}; do
55 eval route_args=\$route_${i}
56 atmconfig natm add ${route_args}
63 echo -n 'Additional routing options:'
64 case ${tcp_extensions} in
68 echo -n ' tcp extensions=NO'
69 sysctl net.inet.tcp.rfc1323=0 >/dev/null
73 case ${icmp_bmcastecho} in
75 echo -n ' broadcast ping responses=YES'
76 sysctl net.inet.icmp.bmcastecho=1 >/dev/null
80 case ${icmp_drop_redirect} in
82 echo -n ' ignore ICMP redirect=YES'
83 sysctl net.inet.icmp.drop_redirect=1 >/dev/null
87 case ${icmp_log_redirect} in
89 echo -n ' log ICMP redirect=YES'
90 sysctl net.inet.icmp.log_redirect=1 >/dev/null
94 case ${gateway_enable} in
96 echo -n ' IP gateway=YES'
97 sysctl net.inet.ip.forwarding=1 >/dev/null
101 case ${forward_sourceroute} in
103 echo -n ' do source routing=YES'
104 sysctl net.inet.ip.sourceroute=1 >/dev/null
108 case ${accept_sourceroute} in
110 echo -n ' accept source routing=YES'
111 sysctl net.inet.ip.accept_sourceroute=1 >/dev/null
115 case ${tcp_keepalive} in
117 echo -n ' TCP keepalive=NO'
118 sysctl net.inet.tcp.always_keepalive=0 >/dev/null
122 case ${tcp_drop_synfin} in
124 echo -n ' drop SYN+FIN packets=YES'
125 sysctl net.inet.tcp.drop_synfin=1 >/dev/null
129 case ${ipxgateway_enable} in
131 echo -n ' IPX gateway=YES'
132 sysctl net.ipx.ipx.ipxforwarding=1 >/dev/null
136 case ${arpproxy_all} in
138 echo -n ' ARP proxyall=YES'
139 sysctl net.link.ether.inet.proxyall=1 >/dev/null
143 case ${ip_portrange_first} in
147 echo -n " ip_portrange_first=$ip_portrange_first"
148 sysctl net.inet.ip.portrange.first=$ip_portrange_first >/dev/null
152 case ${ip_portrange_last} in
156 echo -n " ip_portrange_last=$ip_portrange_last"
157 sysctl net.inet.ip.portrange.last=$ip_portrange_last >/dev/null