chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
networkd: add minimal IP forwarding and masquerading support to .network files
[elogind.git]
/
src
/
network
/
networkd-network.c
diff --git
a/src/network/networkd-network.c
b/src/network/networkd-network.c
index 966b59b878d8f658b0cf906ff6d59e90e7d9affc..d6504cc1787cfebe17307eae97d98b07cb656361 100644
(file)
--- a/
src/network/networkd-network.c
+++ b/
src/network/networkd-network.c
@@
-22,14
+22,14
@@
#include <ctype.h>
#include <net/if.h>
#include <ctype.h>
#include <net/if.h>
-#include "networkd.h"
-#include "networkd-netdev.h"
-#include "networkd-link.h"
-#include "network-internal.h"
#include "path-util.h"
#include "conf-files.h"
#include "conf-parser.h"
#include "util.h"
#include "path-util.h"
#include "conf-files.h"
#include "conf-parser.h"
#include "util.h"
+#include "networkd.h"
+#include "networkd-netdev.h"
+#include "networkd-link.h"
+#include "network-internal.h"
static int network_load_one(Manager *manager, const char *filename) {
_cleanup_network_free_ Network *network = NULL;
static int network_load_one(Manager *manager, const char *filename) {
_cleanup_network_free_ Network *network = NULL;
@@
-109,6
+109,10
@@
static int network_load_one(Manager *manager, const char *filename) {
if (r < 0)
return r;
if (r < 0)
return r;
+ /* IPMasquerade=yes implies IPForward=yes */
+ if (network->ip_masquerade)
+ network->ip_forward = true;
+
LIST_PREPEND(networks, manager->networks, network);
LIST_FOREACH(routes, route, network->static_routes) {
LIST_PREPEND(networks, manager->networks, network);
LIST_FOREACH(routes, route, network->static_routes) {