1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

networkd: actually always use AddressFamilyBoolean as the bit mask it is

This commit is contained in:
Lennart Poettering 2015-06-09 01:05:34 +02:00
parent 3a3701f033
commit e0ee46f290
3 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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) \