From f00ff0de40030ed86e7d78c8c1f77b042b51d38c Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Tue, 2 May 2017 20:32:42 +0100 Subject: network: reject bridge port priorities above kernel's max value. (#5877) Bridge port priority in the kernel can only be between 0 and 63. Therefore reject values above maximum. Fixes: #5729 --- src/network/networkd-link.h | 2 -- src/network/networkd-network-gperf.gperf | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src/network') diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h index 39c8430ac3..be5c4f3284 100644 --- a/src/network/networkd-link.h +++ b/src/network/networkd-link.h @@ -33,8 +33,6 @@ #include "list.h" #include "set.h" -#define LINK_BRIDGE_PORT_PRIORITY_INVALID 128 - typedef enum LinkState { LINK_STATE_PENDING, LINK_STATE_ENSLAVING, diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 6c4530fbd4..ee8bd6faf7 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -129,7 +129,7 @@ Bridge.HairPin, config_parse_bool, 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) +Bridge.Priority, config_parse_bridge_port_priority, 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 -- cgit v1.2.3-54-g00ecf