mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
connman: fix ip forwarding bug
This commit is contained in:
parent
10de47343f
commit
2f25c2c8f4
@ -0,0 +1,25 @@
|
|||||||
|
From 4f9abd3aebb1694d6a412d31d322cf1b5244a71c Mon Sep 17 00:00:00 2001
|
||||||
|
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||||
|
Date: Sat, 22 Apr 2017 02:55:33 +0100
|
||||||
|
Subject: [PATCH] ip_forward: sysctl now ignores non-zero offset writes in
|
||||||
|
latest kernels
|
||||||
|
|
||||||
|
---
|
||||||
|
src/nat.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/nat.c b/src/nat.c
|
||||||
|
index 33ae6df..27e0d18 100644
|
||||||
|
--- a/src/nat.c
|
||||||
|
+++ b/src/nat.c
|
||||||
|
@@ -54,6 +54,7 @@ static int enable_ip_forward(bool enable)
|
||||||
|
if (!value) {
|
||||||
|
if (read(f, &value, sizeof(value)) < 0)
|
||||||
|
value = 0;
|
||||||
|
+ lseek(f, 0, SEEK_SET); // reset file pos for subsequent write
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enable) {
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user