3 # Configure routing and miscellaneous network tunables
9 # REQUIRE: devd netif ppp
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"
27 # Return without waiting if we don't have dhcp interfaces.
28 # Once we can test that the link is actually up, we should
29 # remove this test and always wait.
30 dhcp_interfaces=`list_net_interfaces dhcp`
31 [ -z "`list_net_interfaces dhcp`" ] && return
33 # Wait for a default route
35 while [ ${delay} -gt 0 ]; do
36 defif=`get_default_if -inet`
37 if [ -n "${defif}" ]; then
38 if [ ${delay} -ne ${if_up_delay} ]; then
43 if [ ${delay} -eq ${if_up_delay} ]; then
44 echo -n "Waiting ${delay}s for an interface to come up: "
49 delay=`expr $delay - 1`
60 case ${defaultrouter} in
64 static_routes="default ${static_routes}"
65 route_default="default ${defaultrouter}"
69 # Setup static routes. This should be done before router discovery.
71 if [ -n "${static_routes}" ]; then
72 for i in ${static_routes}; do
73 eval route_args=\$route_${i}
74 route add ${route_args}
77 # Now ATM static routes
79 if [ -n "${natm_static_routes}" ]; then
80 for i in ${natm_static_routes}; do
81 eval route_args=\$route_${i}
82 atmconfig natm add ${route_args}
89 echo -n 'Additional routing options:'
90 case ${icmp_bmcastecho} in
92 echo -n ' broadcast ping responses=YES'
93 sysctl net.inet.icmp.bmcastecho=1 >/dev/null
97 case ${icmp_drop_redirect} in
99 echo -n ' ignore ICMP redirect=YES'
100 sysctl net.inet.icmp.drop_redirect=1 >/dev/null
104 case ${icmp_log_redirect} in
106 echo -n ' log ICMP redirect=YES'
107 sysctl net.inet.icmp.log_redirect=1 >/dev/null
111 case ${gateway_enable} in
113 echo -n ' IP gateway=YES'
114 sysctl net.inet.ip.forwarding=1 >/dev/null
118 case ${forward_sourceroute} in
120 echo -n ' do source routing=YES'
121 sysctl net.inet.ip.sourceroute=1 >/dev/null
125 case ${accept_sourceroute} in
127 echo -n ' accept source routing=YES'
128 sysctl net.inet.ip.accept_sourceroute=1 >/dev/null
132 case ${ipxgateway_enable} in
134 echo -n ' IPX gateway=YES'
135 sysctl net.ipx.ipx.ipxforwarding=1 >/dev/null
139 case ${arpproxy_all} in
141 echo -n ' ARP proxyall=YES'
142 sysctl net.link.ether.inet.proxyall=1 >/dev/null