]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: rename BPDUGuard to UseBPDU
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 25 Jul 2015 02:52:26 +0000 (22:52 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 25 Jul 2015 03:44:42 +0000 (23:44 -0400)
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).

man/systemd.network.xml
src/network/networkd-link.c
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd.h

index 85f16e73e6d66064fd83101d0df6b9353cb3d693..0dab96d127e9f045654a31a8b149547f062d5f58 100644 (file)
           </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>
index 55510b46e94be6a358c67e88492aab100578cd36..54077db486fbf50e5dd8ec9b264ea907c9eec69b 100644 (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");
 
index 720f6b9d0bd7f672c48fbb6b2ec2c6051a1a5e0b..1416ba1d323cb38e93cc2944111afd1e108b3e6c 100644 (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)
index 55e735e6bf44b792a84fa471d83b762caee779be..ff0f72cfe59ed075c5023eac84969894ca21acf1 100644 (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;
index 6418c0a536a6368a84a0a412d850b2bf1d9556b2..7aade401d8b006a98de8155a7a5288ab2e0d82a9 100644 (file)
@@ -150,7 +150,7 @@ struct Network {
 
         bool dhcp_server;
 
-        bool bpdu_guard;
+        bool use_bpdu;
         bool hairpin;
         bool fast_leave;
         bool root_block;