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).
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-07-24 22:52:26 -04:00
parent 47c7dfe275
commit 84c3409631
5 changed files with 7 additions and 7 deletions

View File

@ -687,12 +687,10 @@
</listitem>
</varlistentry>
<varlistentry>
<term><varname>BPDUGuard=</varname></term>
<term><varname>UseBPDU=</varname></term>
<listitem>
<para>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.</para>
processed by the bridge port. Defaults to yes.</para>
</listitem>
</varlistentry>
<varlistentry>

View File

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

View File

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

View File

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

View File

@ -150,7 +150,7 @@ struct Network {
bool dhcp_server;
bool bpdu_guard;
bool use_bpdu;
bool hairpin;
bool fast_leave;
bool root_block;