summaryrefslogtreecommitdiff
path: root/src/network/networkd-network-gperf.gperf
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2017-04-11 22:17:31 +0100
committerMartin Pitt <martinpitt@users.noreply.github.com>2017-04-11 23:17:31 +0200
commitb56be2966a8a8bcc2432e37370bad5381498a819 (patch)
tree79083431600346ae3c1910f142b60d1948d40f7a /src/network/networkd-network-gperf.gperf
parentc618423a5aacb0378985f6d49d31be65866ab79a (diff)
networkd: Add bridge port priority setting (#5545)
Allow setting bridge port priority in the Bridge section of the network file, similar to e.g. port path cost setting. Set the default to an invalid value of 128, and only set the port priority when it's not 128. Unlike e.g. path cost, zero is a valid priority value. Add a networkd-test.py to check that bridge port priority is correctly set. Incidently, fix bridge port cost type and document valid ranges.
Diffstat (limited to 'src/network/networkd-network-gperf.gperf')
-rw-r--r--src/network/networkd-network-gperf.gperf3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index 68052ba544..9658978651 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -119,12 +119,13 @@ DHCPServer.EmitTimezone, config_parse_bool,
DHCPServer.Timezone, config_parse_timezone, 0, offsetof(Network, dhcp_server_timezone)
DHCPServer.PoolOffset, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_offset)
DHCPServer.PoolSize, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_size)
-Bridge.Cost, config_parse_unsigned, 0, offsetof(Network, cost)
+Bridge.Cost, config_parse_uint32, 0, offsetof(Network, cost)
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.AllowPortToBeRoot, config_parse_bool, 0, offsetof(Network, allow_port_to_be_root)
Bridge.UnicastFlood, config_parse_bool, 0, offsetof(Network, unicast_flood)
+Bridge.Priority, config_parse_uint16, 0, offsetof(Network, priority)
BridgeFDB.MACAddress, config_parse_fdb_hwaddr, 0, 0
BridgeFDB.VLANId, config_parse_fdb_vlan_id, 0, 0
BridgeVLAN.PVID, config_parse_brvlan_pvid, 0, 0