summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2017-05-09 20:04:55 +0200
committerLennart Poettering <lennart@poettering.net>2017-05-09 20:04:55 +0200
commit465dfe59fcbb81f21161417a74dd33276bf8039b (patch)
tree547cec8ce68444416b40d863e19e9579391fd9fa /src/network
parentnetworkd: add support to configure route protocol. (#5890) (diff)
downloadsystemd-465dfe59fcbb81f21161417a74dd33276bf8039b.tar.xz
systemd-465dfe59fcbb81f21161417a74dd33276bf8039b.zip
networkd: add IPv6ProxyNDP (#5913)
This allows enabling proxy_ndp even if no addresses are configured in networkd, as well as disabling proxy_ndp from a drop-in.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-ipv6-proxy-ndp.c3
-rw-r--r--src/network/networkd-network-gperf.gperf1
-rw-r--r--src/network/networkd-network.c1
-rw-r--r--src/network/networkd-network.h1
4 files changed, 6 insertions, 0 deletions
diff --git a/src/network/networkd-ipv6-proxy-ndp.c b/src/network/networkd-ipv6-proxy-ndp.c
index 11c1cd9268..00790c0c13 100644
--- a/src/network/networkd-ipv6-proxy-ndp.c
+++ b/src/network/networkd-ipv6-proxy-ndp.c
@@ -38,6 +38,9 @@ static bool ipv6_proxy_ndp_is_needed(Link *link) {
if (!link->network)
return false;
+ if (link->network->ipv6_proxy_ndp != -1)
+ return link->network->ipv6_proxy_ndp;
+
if (link->network->n_ipv6_proxy_ndp_addresses == 0)
return false;
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index ef53b528a8..b2c585f866 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -63,6 +63,7 @@ Network.IPv6AcceptRA, config_parse_tristate,
Network.IPv6AcceptRouterAdvertisements, config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra)
Network.IPv6DuplicateAddressDetection, config_parse_int, 0, offsetof(Network, ipv6_dad_transmits)
Network.IPv6HopLimit, config_parse_int, 0, offsetof(Network, ipv6_hop_limit)
+Network.IPv6ProxyNDP, config_parse_tristate, 0, offsetof(Network, ipv6_proxy_ndp)
Network.ActiveSlave, config_parse_bool, 0, offsetof(Network, active_slave)
Network.PrimarySlave, config_parse_bool, 0, offsetof(Network, primary_slave)
Network.IPv4ProxyARP, config_parse_tristate, 0, offsetof(Network, proxy_arp)
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 0c0e661909..3c26c8609e 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -184,6 +184,7 @@ static int network_load_one(Manager *manager, const char *filename) {
network->ipv6_accept_ra = -1;
network->ipv6_dad_transmits = -1;
network->ipv6_hop_limit = -1;
+ network->ipv6_proxy_ndp = -1;
network->duid.type = _DUID_TYPE_INVALID;
network->proxy_arp = -1;
network->arp = -1;
diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h
index 28ef285be6..c9326c7f1e 100644
--- a/src/network/networkd-network.h
+++ b/src/network/networkd-network.h
@@ -178,6 +178,7 @@ struct Network {
int ipv6_accept_ra;
int ipv6_dad_transmits;
int ipv6_hop_limit;
+ int ipv6_proxy_ndp;
int proxy_arp;
bool ipv6_accept_ra_use_dns;