From: Zbigniew Jędrzejewski-Szmek Date: Sat, 25 Jul 2015 02:52:26 +0000 (-0400) Subject: networkd: rename BPDUGuard to UseBPDU X-Git-Tag: v223~33^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84c3409631f48869dcb59c0a74eba6d4ac40ad93;p=thirdparty%2Fsystemd.git 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). --- diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 85f16e73e6d..0dab96d127e 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -687,12 +687,10 @@ - BPDUGuard= + UseBPDU= A boolean. Configures whether STP Bridge Protocol Data Units will be - processed by the bridge port. By default, the flag is false allowing BPDU - processing. Turning this flag on will cause the port to stop processing - STP Bridge Protocol Data Units. Defaults to off. + processed by the bridge port. Defaults to yes. diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 55510b46e94..54077db486f 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 720f6b9d0bd..1416ba1d323 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 55e735e6bf4..ff0f72cfe59 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 6418c0a536a..7aade401d8b 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;