summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-13 19:48:19 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-13 20:17:06 +0100
commitcb9fc36a1211967e8c58b0502a26c42552ac8060 (patch)
tree6693e9724db113f07fb6655e13f0c7780779d9c3 /src/network/networkd-link.c
parent66518acd40fbd99a87e553b2d0904c37c8929fb2 (diff)
networkd: introduce an AddressFamilyBoolean enum type
This introduces am AddressFamilyBoolean type that works more or less like a booleaan, but can optionally turn on/off things for ipv4 and ipv6 independently. THis also ports the DHCP field over to it.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 12944a03a3..1e2596749f 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -42,7 +42,7 @@ static bool link_dhcp6_enabled(Link *link) {
if (!link->network)
return false;
- return IN_SET(link->network->dhcp, DHCP_SUPPORT_V6, DHCP_SUPPORT_BOTH);
+ return IN_SET(link->network->dhcp, ADDRESS_FAMILY_IPV6, ADDRESS_FAMILY_YES);
}
static bool link_dhcp4_enabled(Link *link) {
@@ -52,7 +52,7 @@ static bool link_dhcp4_enabled(Link *link) {
if (!link->network)
return false;
- return IN_SET(link->network->dhcp, DHCP_SUPPORT_V4, DHCP_SUPPORT_BOTH);
+ return IN_SET(link->network->dhcp, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES);
}
static bool link_dhcp4_server_enabled(Link *link) {
@@ -1331,7 +1331,7 @@ static int link_initialized_and_synced(sd_rtnl *rtnl, sd_rtnl_message *m,
if (network->ipv4ll)
log_link_debug(link, "ignoring IPv4LL for loopback link");
- if (network->dhcp != DHCP_SUPPORT_NONE)
+ if (network->dhcp != ADDRESS_FAMILY_NO)
log_link_debug(link, "ignoring DHCP clients for loopback link");
if (network->dhcp_server)