Commit cb5e4254 authored by Darren Shepherd's avatar Darren Shepherd

Set /proc/sys/net/ipv4/ip_forward on agent start

parent 012bdcb9
...@@ -9,6 +9,7 @@ import ( ...@@ -9,6 +9,7 @@ import (
var ( var (
callIPTablesFile = "/proc/sys/net/bridge/bridge-nf-call-iptables" callIPTablesFile = "/proc/sys/net/bridge/bridge-nf-call-iptables"
forward = "/proc/sys/net/ipv4/ip_forward"
) )
func Configure() error { func Configure() error {
...@@ -16,5 +17,8 @@ func Configure() error { ...@@ -16,5 +17,8 @@ func Configure() error {
if err := ioutil.WriteFile(callIPTablesFile, []byte("1"), 0640); err != nil { if err := ioutil.WriteFile(callIPTablesFile, []byte("1"), 0640); err != nil {
logrus.Warnf("failed to write value 1 at %s: %v", callIPTablesFile, err) logrus.Warnf("failed to write value 1 at %s: %v", callIPTablesFile, err)
} }
if err := ioutil.WriteFile(forward, []byte("1"), 0640); err != nil {
logrus.Warnf("failed to write value 1 at %s: %v", forward, err)
}
return nil return nil
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment