blob: 07d1ab227814c227bc4fdef27f4d402ad7bc5f37 (
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
|
# accept_source_route
# default - 0
# Accept packets with SRR option. conf/all/accept_source_route and
# conf/[interface]/accept_source_route must be set to TRUE
# to accept packets with SRR option on the interface
type: txt
help: Set policy for handling IPv4 packets with source route option
comp_help:Possible completions:
enable\tEnable processing of IPv4 packets with source route option
disable\tDisable processing of IPv4 packets with source route option
default: "disable"
syntax:expression: $VAR(@) in "enable", "disable"; "ip-src-route must be enable or disable"
update:
if [ x$VAR(@) == xenable ]; then
array=(`ls /proc/sys/net/ipv4/conf/`)
array_len=${#array[*]}
i=0
while [ $i -lt $array_len ]; do
sudo sh -c "echo 1 > \
/proc/sys/net/ipv4/conf/${array[$i]%:*}/accept_source_route"
let i++
done
else
sudo sh -c "echo 0 > \
/proc/sys/net/ipv4/conf/all/accept_source_route"
fi
delete:
sudo sh -c "echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route"
|