[packages] olsrd: Upgrade to v0.5.6-r6
[lede-routing/.git] / patches / 100-no_forwarding_override.patch
1 --- a/src/linux/net.c
2 +++ b/src/linux/net.c
3 @@ -107,6 +107,7 @@ bind_socket_to_device(int sock, char *de
4  int
5  enable_ip_forwarding(int version)
6  {
7 +#if 0
8    FILE *proc_fwd;
9    const char *const procfile = version == AF_INET ? "/proc/sys/net/ipv4/ip_forward" : "/proc/sys/net/ipv6/conf/all/forwarding";
10  
11 @@ -142,6 +143,7 @@ enable_ip_forwarding(int version)
12      }
13      fclose(proc_fwd);
14    }
15 +#endif
16    return 1;
17  }
18  
19 @@ -268,6 +270,7 @@ restore_settings(int version)
20    OLSR_PRINTF(1, "Restoring network state\n");
21  
22    /* Restore IP forwarding to "off" */
23 +#if 0
24    if (orig_fwd_state == '0') {
25      const char *const procfile = version == AF_INET ? "/proc/sys/net/ipv4/ip_forward" : "/proc/sys/net/ipv6/conf/all/forwarding";
26      FILE *proc_fd;
27 @@ -280,6 +283,7 @@ restore_settings(int version)
28        fclose(proc_fd);
29      }
30    }
31 +#endif
32  
33    /* Restore global ICMP redirect setting */
34    if (orig_global_redirect_state != '0') {