summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-dhcp4.c2
-rw-r--r--src/network/networkd-ipv4ll.c2
-rw-r--r--src/network/networkd-link.c12
3 files changed, 8 insertions, 8 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 20aee53d6e..71cc722bcc 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -561,7 +561,7 @@ int dhcp4_configure(Link *link) {
assert(link);
assert(link->network);
- assert(IN_SET(link->network->dhcp, ADDRESS_FAMILY_YES, ADDRESS_FAMILY_IPV4));
+ assert(link->network->dhcp & ADDRESS_FAMILY_IPV4);
r = sd_dhcp_client_new(&link->dhcp_client);
if (r < 0)
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c
index 8050801e19..cfc0d90470 100644
--- a/src/network/networkd-ipv4ll.c
+++ b/src/network/networkd-ipv4ll.c
@@ -209,7 +209,7 @@ int ipv4ll_configure(Link *link) {
assert(link);
assert(link->network);
- assert(IN_SET(link->network->link_local, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES));
+ assert(link->network->link_local & ADDRESS_FAMILY_IPV4);
r = sd_ipv4ll_new(&link->ipv4ll);
if (r < 0)
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index b30fd7ae89..5c62300b70 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -40,7 +40,7 @@ bool link_dhcp6_enabled(Link *link) {
if (!link->network)
return false;
- return IN_SET(link->network->dhcp, ADDRESS_FAMILY_IPV6, ADDRESS_FAMILY_YES);
+ return link->network->dhcp & ADDRESS_FAMILY_IPV6;
}
bool link_dhcp4_enabled(Link *link) {
@@ -50,7 +50,7 @@ bool link_dhcp4_enabled(Link *link) {
if (!link->network)
return false;
- return IN_SET(link->network->dhcp, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES);
+ return link->network->dhcp & ADDRESS_FAMILY_IPV4;
}
bool link_dhcp4_server_enabled(Link *link) {
@@ -70,7 +70,7 @@ bool link_ipv4ll_enabled(Link *link) {
if (!link->network)
return false;
- return IN_SET(link->network->link_local, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES);
+ return link->network->link_local & ADDRESS_FAMILY_IPV4;
}
bool link_ipv6ll_enabled(Link *link) {
@@ -80,7 +80,7 @@ bool link_ipv6ll_enabled(Link *link) {
if (!link->network)
return false;
- return IN_SET(link->network->link_local, ADDRESS_FAMILY_IPV6, ADDRESS_FAMILY_YES);
+ return link->network->link_local & ADDRESS_FAMILY_IPV6;
}
bool link_lldp_enabled(Link *link) {
@@ -103,7 +103,7 @@ static bool link_ipv4_forward_enabled(Link *link) {
if (!link->network)
return false;
- return IN_SET(link->network->ip_forward, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES);
+ return link->network->ip_forward & ADDRESS_FAMILY_IPV4;
}
static bool link_ipv6_forward_enabled(Link *link) {
@@ -113,7 +113,7 @@ static bool link_ipv6_forward_enabled(Link *link) {
if (!link->network)
return false;
- return IN_SET(link->network->ip_forward, ADDRESS_FAMILY_IPV6, ADDRESS_FAMILY_YES);
+ return link->network->ip_forward & ADDRESS_FAMILY_IPV6;
}
#define FLAG_STRING(string, flag, old, new) \