From 84c3409631f48869dcb59c0a74eba6d4ac40ad93 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 24 Jul 2015 22:52:26 -0400 Subject: networkd: rename BPDUGuard to UseBPDU Rename to follow the follow the style of other options. In general "positive" options are preferred to "negative" ones, because they are easier to describe and easier for humans to parse (c.f. the shortening on the man page entry). --- src/network/networkd-link.c | 2 +- src/network/networkd-network-gperf.gperf | 2 +- src/network/networkd-network.c | 2 ++ src/network/networkd.h | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 55510b46e9..54077db486 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -858,7 +858,7 @@ static int link_set_bridge(Link *link) { if (r < 0) return log_link_error_errno(link, r, "Could not append IFLA_PROTINFO attribute: %m"); - r = sd_netlink_message_append_u8(req, IFLA_BRPORT_GUARD, link->network->bpdu_guard); + r = sd_netlink_message_append_u8(req, IFLA_BRPORT_GUARD, !link->network->use_bpdu); if (r < 0) return log_link_error_errno(link, r, "Could not append IFLA_BRPORT_GUARD attribute: %m"); diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 720f6b9d0b..1416ba1d32 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -73,7 +73,7 @@ DHCP.CriticalConnection, config_parse_bool, 0 DHCP.VendorClassIdentifier, config_parse_string, 0, offsetof(Network, dhcp_vendor_class_identifier) DHCP.RouteMetric, config_parse_unsigned, 0, offsetof(Network, dhcp_route_metric) Bridge.Cost, config_parse_unsigned, 0, offsetof(Network, cost) -Bridge.BPDUGuard, config_parse_bool, 0, offsetof(Network, bpdu_guard) +Bridge.UseBPDU, config_parse_bool, 0, offsetof(Network, use_bpdu) Bridge.HairPin, config_parse_bool, 0, offsetof(Network, hairpin) Bridge.FastLeave, config_parse_bool, 0, offsetof(Network, fast_leave) Bridge.RootBlock, config_parse_bool, 0, offsetof(Network, root_block) diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 55e735e6bf..ff0f72cfe5 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -107,6 +107,8 @@ static int network_load_one(Manager *manager, const char *filename) { network->dhcp_route_metric = DHCP_ROUTE_METRIC; network->dhcp_client_identifier = DHCP_CLIENT_ID_DUID; + network->use_bpdu = true; + network->llmnr = LLMNR_SUPPORT_YES; network->link_local = ADDRESS_FAMILY_IPV6; diff --git a/src/network/networkd.h b/src/network/networkd.h index 6418c0a536..7aade401d8 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -150,7 +150,7 @@ struct Network { bool dhcp_server; - bool bpdu_guard; + bool use_bpdu; bool hairpin; bool fast_leave; bool root_block; -- cgit v1.2.3-54-g00ecf