summaryrefslogtreecommitdiff
path: root/recipes/vlan/files/ip
diff options
context:
space:
mode:
authorRoman I Khimov <khimov@altell.ru>2009-09-08 19:01:03 +0400
committerRoman I Khimov <khimov@altell.ru>2010-03-25 09:35:30 +0300
commitc2745e97a62e4f5f2f3ef5f536df62ac978e31e7 (patch)
treeeea48682a737fb79cfe62fa2719ba4d3d8c02c23 /recipes/vlan/files/ip
parentcbdea1efdc7e10e12f8f5352558e205842593098 (diff)
vlan: add pre-up/post-down/up scripts
Diffstat (limited to 'recipes/vlan/files/ip')
-rw-r--r--recipes/vlan/files/ip21
1 files changed, 21 insertions, 0 deletions
diff --git a/recipes/vlan/files/ip b/recipes/vlan/files/ip
new file mode 100644
index 0000000000..d7de05c05a
--- /dev/null
+++ b/recipes/vlan/files/ip
@@ -0,0 +1,21 @@
+#!/bin/sh
+# This should probably go into ifupdown
+# But usually only those with lots of interfaces (vlans) need these
+if [ -d "/proc/sys/net/ipv4/conf/$IFACE" ]
+then
+ if [ -n "$IF_IP_PROXY_ARP" ]; then
+ if [ "$IF_IP_PROXY_ARP" -eq "1" ]; then
+ echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp"
+ else
+ echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp"
+ fi
+ fi
+ if [ -n "$IF_IP_RP_FILTER" ]; then
+ if [ "$IF_IP_RP_FILTER" -eq "0" ]; then
+ echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter"
+ else
+ echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter"
+ fi
+ fi
+fi
+