summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-07-24 22:52:26 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-07-24 23:44:42 -0400
commit84c3409631f48869dcb59c0a74eba6d4ac40ad93 (patch)
tree9046554328798ef18fdb4f4326b6829d38abfc3c
parent47c7dfe275b30cb507108f08e471d2d9ef2baa56 (diff)
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).
-rw-r--r--man/systemd.network.xml6
-rw-r--r--src/network/networkd-link.c2
-rw-r--r--src/network/networkd-network-gperf.gperf2
-rw-r--r--src/network/networkd-network.c2
-rw-r--r--src/network/networkd.h2
5 files changed, 7 insertions, 7 deletions
diff --git a/man/systemd.network.xml b/man/systemd.network.xml
index 85f16e73e6..0dab96d127 100644
--- a/man/systemd.network.xml
+++ b/man/systemd.network.xml
@@ -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>
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;