diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2016-04-15 13:13:20 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2016-04-15 13:18:42 +0300 |
commit | 9ccad4e15f85536c8bfe6392080be116113c909e (patch) | |
tree | 4f3b48b51d36ccc0b9cdf840064dbbc2a1d4d781 | |
parent | a7af1919a74a7b520584685e560a98a33b894b25 (diff) | |
download | connman-9ccad4e15f85536c8bfe6392080be116113c909e.tar.gz |
nat: Open IPv4 forwarding file with proper mode
The file needs to be read and written to.
-rw-r--r-- | src/nat.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -48,7 +48,7 @@ static int enable_ip_forward(bool enable) static char value = 0; int f, err = 0; - if ((f = open("/proc/sys/net/ipv4/ip_forward", O_CLOEXEC)) < 0) + if ((f = open("/proc/sys/net/ipv4/ip_forward", O_CLOEXEC | O_RDWR)) < 0) return -errno; if (!value) { |