3 # Configure routing and miscellaneous network tunables
5 # $FreeBSD: src/etc/rc.d/network2,v 1.137 2003/06/29 05:15:57 mtm Exp $
6 # $DragonFly: src/etc/rc.d/Attic/network2,v 1.2 2004/01/27 00:42:45 rob Exp $
10 # REQUIRE: netif ppp-user
11 # KEYWORD: DragonFly nostart
16 start_cmd="network2_start"
21 case ${defaultrouter} in
25 static_routes="default ${static_routes}"
26 route_default="default ${defaultrouter}"
30 # Setup static routes. This should be done before router discovery.
32 if [ -n "${static_routes}" ]; then
33 for i in ${static_routes}; do
34 eval route_args=\$route_${i}
35 route add ${route_args}
39 echo -n 'Additional routing options:'
40 case ${tcp_extensions} in
44 echo -n ' tcp extensions=NO'
45 sysctl net.inet.tcp.rfc1323=0 >/dev/null
49 case ${icmp_bmcastecho} in
51 echo -n ' broadcast ping responses=YES'
52 sysctl net.inet.icmp.bmcastecho=1 >/dev/null
56 case ${icmp_drop_redirect} in
58 echo -n ' ignore ICMP redirect=YES'
59 sysctl net.inet.icmp.drop_redirect=1 >/dev/null
63 case ${icmp_log_redirect} in
65 echo -n ' log ICMP redirect=YES'
66 sysctl net.inet.icmp.log_redirect=1 >/dev/null
70 case ${gateway_enable} in
72 echo -n ' IP gateway=YES'
73 sysctl net.inet.ip.forwarding=1 >/dev/null
77 case ${forward_sourceroute} in
79 echo -n ' do source routing=YES'
80 sysctl net.inet.ip.sourceroute=1 >/dev/null
84 case ${accept_sourceroute} in
86 echo -n ' accept source routing=YES'
87 sysctl net.inet.ip.accept_sourceroute=1 >/dev/null
91 case ${tcp_keepalive} in
93 echo -n ' TCP keepalive=NO'
94 sysctl net.inet.tcp.always_keepalive=0 >/dev/null
98 case ${tcp_drop_synfin} in
100 echo -n ' drop SYN+FIN packets=YES'
101 sysctl net.inet.tcp.drop_synfin=1 >/dev/null
105 case ${ipxgateway_enable} in
107 echo -n ' IPX gateway=YES'
108 sysctl net.ipx.ipx.ipxforwarding=1 >/dev/null
112 case ${arpproxy_all} in
114 echo -n ' ARP proxyall=YES'
115 sysctl net.link.ether.inet.proxyall=1 >/dev/null
119 case ${ip_portrange_first} in
123 echo -n " ip_portrange_first=$ip_portrange_first"
124 sysctl net.inet.ip.portrange.first=$ip_portrange_first >/dev/null
128 case ${ip_portrange_last} in
132 echo -n " ip_portrange_last=$ip_portrange_last"
133 sysctl net.inet.ip.portrange.last=$ip_portrange_last >/dev/null