15 desc="Network options setup"
16 start_cmd="netoptions_start"
22 if [ -z "${_netoptions_initdone}" ]; then
23 echo -n 'Additional TCP/IP options:'
24 _netoptions_initdone=yes
32 for _af in inet inet6; do
33 afexists ${_af} && eval netoptions_${_af}
35 [ -n "${_netoptions_initdone}" ] && echo '.'
40 case ${log_in_vain} in
43 echo -n " log_in_vain=${log_in_vain}"
44 ${SYSCTL} net.inet.tcp.log_in_vain=${log_in_vain} >/dev/null
45 ${SYSCTL} net.inet.udp.log_in_vain=${log_in_vain} >/dev/null
48 ${SYSCTL} net.inet.tcp.log_in_vain=0 >/dev/null
49 ${SYSCTL} net.inet.udp.log_in_vain=0 >/dev/null
53 if checkyesno tcp_extensions; then
54 ${SYSCTL} net.inet.tcp.rfc1323=1 >/dev/null
57 echo -n " rfc1323 extensions=${tcp_extensions}"
58 ${SYSCTL} net.inet.tcp.rfc1323=0 >/dev/null
61 if checkyesno tcp_keepalive; then
62 ${SYSCTL} net.inet.tcp.always_keepalive=1 >/dev/null
65 echo -n " TCP keepalive=${tcp_keepalive}"
66 ${SYSCTL} net.inet.tcp.always_keepalive=0 >/dev/null
69 if checkyesno tcp_drop_synfin; then
71 echo -n " drop SYN+FIN packets=${tcp_drop_synfin}"
72 ${SYSCTL} net.inet.tcp.drop_synfin=1 >/dev/null
74 ${SYSCTL} net.inet.tcp.drop_synfin=0 >/dev/null
77 case ${ip_portrange_first} in
80 echo -n " ip_portrange_first=$ip_portrange_first"
81 ${SYSCTL} net.inet.ip.portrange.first=$ip_portrange_first >/dev/null
85 case ${ip_portrange_last} in
88 echo -n " ip_portrange_last=$ip_portrange_last"
89 ${SYSCTL} net.inet.ip.portrange.last=$ip_portrange_last >/dev/null
96 if checkyesno ipv6_ipv4mapping; then
98 echo -n " ipv4-mapped-ipv6=${ipv6_ipv4mapping}"
99 ${SYSCTL} net.inet6.ip6.v6only=0 >/dev/null
101 ${SYSCTL} net.inet6.ip6.v6only=1 >/dev/null
104 if checkyesno ipv6_privacy; then
106 echo -n " IPv6 Privacy Addresses"
107 ${SYSCTL} net.inet6.ip6.use_tempaddr=1 >/dev/null
108 ${SYSCTL} net.inet6.ip6.prefer_tempaddr=1 >/dev/null
111 case $ipv6_cpe_wanif in
112 ""|[Nn][Oo]|[Nn][Oo][Nn][Ee]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
113 ${SYSCTL} net.inet6.ip6.no_radr=0 >/dev/null
114 ${SYSCTL} net.inet6.ip6.rfc6204w3=0 >/dev/null
118 echo -n " IPv6 CPE WANIF=${ipv6_cpe_wanif}"
119 ${SYSCTL} net.inet6.ip6.no_radr=1 >/dev/null
120 ${SYSCTL} net.inet6.ip6.rfc6204w3=1 >/dev/null