3 # Configure routing and miscellaneous network tunables
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}
52 # Now ATM static routes
54 if [ -n "${natm_static_routes}" ]; then
55 for i in ${natm_static_routes}; do
56 eval route_args=\$route_${i}
57 atmconfig natm add ${route_args}
61 # Disallow "internal" addresses to appear on the wire if inet6
63 if afexists inet6; then
66 # Get the number of FIBs supported.
67 fibs=`sysctl -n net.fibs`
70 # disallow "internal" addresses to appear on the wire
71 route add -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
72 route add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
74 if test ${i} -lt ${fibs}; then
75 printf "Also installing reject routes for FIBs"
76 while test ${i} -lt ${fibs}; do
77 setfib -F ${i} route -q add -inet6 \
78 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
79 setfib -F ${i} route -q add -inet6 \
80 ::0.0.0.0 -prefixlen 96 ::1 -reject
92 if [ -z "${_ropts_initdone}" ]; then
93 echo -n 'Additional routing options:'
100 case ${icmp_bmcastecho} in
103 echo -n ' broadcast ping responses=YES'
104 sysctl net.inet.icmp.bmcastecho=1 >/dev/null
108 case ${icmp_drop_redirect} in
111 echo -n ' ignore ICMP redirect=YES'
112 sysctl net.inet.icmp.drop_redirect=1 >/dev/null
116 case ${icmp_log_redirect} in
119 echo -n ' log ICMP redirect=YES'
120 sysctl net.inet.icmp.log_redirect=1 >/dev/null
124 case ${gateway_enable} in
127 echo -n ' IP gateway=YES'
128 sysctl net.inet.ip.forwarding=1 >/dev/null
132 case ${forward_sourceroute} in
135 echo -n ' do source routing=YES'
136 sysctl net.inet.ip.sourceroute=1 >/dev/null
140 case ${accept_sourceroute} in
143 echo -n ' accept source routing=YES'
144 sysctl net.inet.ip.accept_sourceroute=1 >/dev/null
148 case ${ipxgateway_enable} in
151 echo -n ' IPX gateway=YES'
152 sysctl net.ipx.ipx.ipxforwarding=1 >/dev/null
156 case ${arpproxy_all} in
159 echo -n ' ARP proxyall=YES'
160 sysctl net.link.ether.inet.proxyall=1 >/dev/null
164 [ -n "${_ropts_initdone}" ] && echo '.'