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
72 while test ${i} -lt ${fibs}; do
73 setfib -F ${i} route add -inet6 \
74 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
75 setfib -F ${i} route add -inet6 \
76 ::0.0.0.0 -prefixlen 96 ::1 -reject
85 if [ -z "${_ropts_initdone}" ]; then
86 echo -n 'Additional routing options:'
93 case ${icmp_bmcastecho} in
96 echo -n ' broadcast ping responses=YES'
97 sysctl net.inet.icmp.bmcastecho=1 >/dev/null
101 case ${icmp_drop_redirect} in
104 echo -n ' ignore ICMP redirect=YES'
105 sysctl net.inet.icmp.drop_redirect=1 >/dev/null
109 case ${icmp_log_redirect} in
112 echo -n ' log ICMP redirect=YES'
113 sysctl net.inet.icmp.log_redirect=1 >/dev/null
117 case ${gateway_enable} in
120 echo -n ' IP gateway=YES'
121 sysctl net.inet.ip.forwarding=1 >/dev/null
125 case ${forward_sourceroute} in
128 echo -n ' do source routing=YES'
129 sysctl net.inet.ip.sourceroute=1 >/dev/null
133 case ${accept_sourceroute} in
136 echo -n ' accept source routing=YES'
137 sysctl net.inet.ip.accept_sourceroute=1 >/dev/null
141 case ${ipxgateway_enable} in
144 echo -n ' IPX gateway=YES'
145 sysctl net.ipx.ipx.ipxforwarding=1 >/dev/null
149 case ${arpproxy_all} in
152 echo -n ' ARP proxyall=YES'
153 sysctl net.link.ether.inet.proxyall=1 >/dev/null
157 [ -n "${_ropts_initdone}" ] && echo '.'