networkd: Add bridge port priority setting (#5545)
authorDimitri John Ledkov <xnox@ubuntu.com>
Tue, 11 Apr 2017 21:17:31 +0000 (22:17 +0100)
committerMartin Pitt <martinpitt@users.noreply.github.com>
Tue, 11 Apr 2017 21:17:31 +0000 (23:17 +0200)
commitb56be2966a8a8bcc2432e37370bad5381498a819
tree79083431600346ae3c1910f142b60d1948d40f7a
parentc618423a5aacb0378985f6d49d31be65866ab79a
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.
man/systemd.network.xml
src/network/networkd-link.c
src/network/networkd-link.h
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
test/networkd-test.py