diff options
Diffstat (limited to 'sys-cluster/vzctl/files/vzctl-3.0.23-ipforwarding-on-start.patch')
-rw-r--r-- | sys-cluster/vzctl/files/vzctl-3.0.23-ipforwarding-on-start.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-ipforwarding-on-start.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-ipforwarding-on-start.patch new file mode 100644 index 000000000000..b07a5b301b62 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-ipforwarding-on-start.patch @@ -0,0 +1,43 @@ +=== modified file 'etc/init.d/vz-gentoo.in' +--- etc/init.d/vz-gentoo.in 2008-11-15 09:57:13 +0000 ++++ etc/init.d/vz-gentoo.in 2008-11-15 11:35:03 +0000 +@@ -116,6 +116,11 @@ + ebegin "Configuring interface ${VZDEV}" + /sbin/sysctl -q -w net.ipv4.conf.${VZDEV}.send_redirects=0 + eend $? ++ if [ "${ENABLE_FORWARDING}" = "yes" ]; then ++ ebegin "Enabling system wide forwading (\$ENABLE_FORWARDING is set to yes)..." ++ sysctl -w "net.ipv4.ip_forward=1" ++ eend $? ++ fi + } + + stop_net() { +@@ -131,6 +136,11 @@ + for mod in ${NET_MODULES}; do + /sbin/modprobe -r ${mod} > /dev/null 2>&1 + done ++ if [ "${ENABLE_FORWARDING}" = "yes" ]; then ++ ebegin "Disabling system wide forwading (\$ENABLE_FORWARDING is set to yes)..." ++ sysctl -w "net.ipv4.ip_forward=0" ++ eend $? ++ fi + } + + start_ve() { + +=== modified file 'etc/vz.conf' +--- etc/vz.conf 2008-11-15 09:57:13 +0000 ++++ etc/vz.conf 2008-11-15 09:58:22 +0000 +@@ -21,6 +21,10 @@ + # By default automatically assigned. + #VE_ROUTE_SRC_DEV="eth0" + ++# Uncomment to enable forwarding automatically during /etc/init.d/vz start ++# (Calls sysctl -w "net.ipv4.ip_forward=1" on start and revert on stop) ++#ENABLE_FORWARDING="yes" ++ + # Controls which interfaces to send ARP requests and modify APR tables on. + NEIGHBOUR_DEVS=detect + + |