blob: 7b02c50d5d24245cbb935bdaa01de8af42d5afb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: netoptions
# REQUIRE: FILESYSTEMS
# KEYWORD: nojail
. /etc/rc.subr
_netoptions_initdone=
netoptions_init()
{
if [ -z "${_netoptions_initdone}" ]; then
echo -n 'Additional TCP/IP options:'
_netoptions_initdone=yes
fi
}
load_rc_config 'XXX'
case ${log_in_vain} in
[Nn][Oo] | '')
log_in_vain=0
;;
[Yy][Ee][Ss])
log_in_vain=1
;;
[0-9]*)
;;
*)
netoptions_init
echo " invalid log_in_vain setting: ${log_in_vain}"
log_in_vain=0
;;
esac
if [ "${log_in_vain}" -ne 0 ]; then
netoptions_init
echo -n " log_in_vain=${log_in_vain}"
sysctl net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null
sysctl net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null
fi
case ${tcp_extensions} in
[Yy][Ee][Ss] | '')
;;
*)
netoptions_init
echo -n ' tcp extensions=NO'
sysctl net.inet.tcp.rfc1323=0 >/dev/null
;;
esac
case ${tcp_keepalive} in
[Nn][Oo])
netoptions_init
echo -n ' TCP keepalive=NO'
sysctl net.inet.tcp.always_keepalive=0 >/dev/null
;;
esac
case ${tcp_drop_synfin} in
[Yy][Ee][Ss])
netoptions_init
echo -n ' drop SYN+FIN packets=YES'
sysctl net.inet.tcp.drop_synfin=1 >/dev/null
;;
esac
case ${ip_portrange_first} in
[Nn][Oo] | '')
;;
*)
netoptions_init
echo -n " ip_portrange_first=$ip_portrange_first"
sysctl net.inet.ip.portrange.first=$ip_portrange_first >/dev/null
;;
esac
case ${ip_portrange_last} in
[Nn][Oo] | '')
;;
*)
netoptions_init
echo -n " ip_portrange_last=$ip_portrange_last"
sysctl net.inet.ip.portrange.last=$ip_portrange_last >/dev/null
;;
esac
[ -n "${_netoptions_initdone}" ] && echo '.'
|