diff options
author | Richard Purdie <richard@openedhand.com> | 2008-08-19 17:16:09 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-08-19 17:16:09 +0000 |
commit | 88213327d85e2c8f8df9a64c0c0cc9bfd42268f7 (patch) | |
tree | de3c56efc1d68872d5236177fa2e3775849cd528 /meta/packages/netbase/netbase | |
parent | 2bee9ce9ef24d703d153b36b92b8f14dc02f018f (diff) | |
download | poky-88213327d85e2c8f8df9a64c0c0cc9bfd42268f7.tar.gz |
netbase: Drop options file and options handling code, its replaced by sysctl.conf
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5078 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/netbase/netbase')
-rw-r--r-- | meta/packages/netbase/netbase/init | 56 | ||||
-rw-r--r-- | meta/packages/netbase/netbase/options | 3 |
2 files changed, 0 insertions, 59 deletions
diff --git a/meta/packages/netbase/netbase/init b/meta/packages/netbase/netbase/init index e40578cfdf..8a67e1cef2 100644 --- a/meta/packages/netbase/netbase/init +++ b/meta/packages/netbase/netbase/init | |||
@@ -15,64 +15,8 @@ if ! [ -x /sbin/ifup ]; then | |||
15 | exit 0 | 15 | exit 0 |
16 | fi | 16 | fi |
17 | 17 | ||
18 | spoofprotect_rp_filter () { | ||
19 | # This is the best method: turn on Source Address Verification and get | ||
20 | # spoof protection on all current and future interfaces. | ||
21 | |||
22 | if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then | ||
23 | for f in /proc/sys/net/ipv4/conf/*; do | ||
24 | [ -e $f/rp_filter ] && echo 1 > $f/rp_filter | ||
25 | done | ||
26 | return 0 | ||
27 | else | ||
28 | return 1 | ||
29 | fi | ||
30 | } | ||
31 | |||
32 | spoofprotect () { | ||
33 | echo -n "Setting up IP spoofing protection: " | ||
34 | if spoofprotect_rp_filter; then | ||
35 | echo "rp_filter." | ||
36 | else | ||
37 | echo "FAILED." | ||
38 | fi | ||
39 | } | ||
40 | |||
41 | ip_forward () { | ||
42 | if [ -e /proc/sys/net/ipv4/ip_forward ]; then | ||
43 | echo -n "Enabling packet forwarding... " | ||
44 | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
45 | echo "done." | ||
46 | fi | ||
47 | } | ||
48 | |||
49 | syncookies () { | ||
50 | if [ -e /proc/sys/net/ipv4/tcp_syncookies ]; then | ||
51 | echo -n "Enabling TCP/IP SYN cookies... " | ||
52 | echo 1 > /proc/sys/net/ipv4/tcp_syncookies | ||
53 | echo "done." | ||
54 | fi | ||
55 | } | ||
56 | |||
57 | doopt () { | ||
58 | optname=$1 | ||
59 | default=$2 | ||
60 | opt=`grep "^$optname=" /etc/network/options` | ||
61 | if [ -z "$opt" ]; then | ||
62 | opt="$optname=$default" | ||
63 | fi | ||
64 | optval=${opt#$optname=} | ||
65 | if [ "$optval" = "yes" ]; then | ||
66 | eval $optname | ||
67 | fi | ||
68 | } | ||
69 | |||
70 | case "$1" in | 18 | case "$1" in |
71 | start) | 19 | start) |
72 | doopt spoofprotect yes | ||
73 | doopt syncookies no | ||
74 | doopt ip_forward no | ||
75 | |||
76 | echo -n "Configuring network interfaces... " | 20 | echo -n "Configuring network interfaces... " |
77 | ifup -a | 21 | ifup -a |
78 | echo "done." | 22 | echo "done." |
diff --git a/meta/packages/netbase/netbase/options b/meta/packages/netbase/netbase/options deleted file mode 100644 index 2000189d19..0000000000 --- a/meta/packages/netbase/netbase/options +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | ip_forward=no | ||
2 | spoofprotect=yes | ||
3 | syncookies=no | ||