core: allow interface altnames in RestrictNetworkInterfaces=
This patch enables IFNAME_VALID_ALTERNATIVE for checks guarding the parsing of RestrictNetworkInterfaces=. The underlying implementation for this option already supports altnames.
This commit is contained in:
committed by
Lennart Poettering
parent
a19e7f3101
commit
4e0db87e4c
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=TEST-62-RESTRICT-IFACES-altname
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c 'ping -c 1 -W 0.2 192.168.113.1'
|
||||
ExecStart=/bin/sh -c 'ping -c 1 -W 0.2 192.168.113.5'
|
||||
ExecStart=/bin/sh -c '! ping -c 1 -W 0.2 192.168.113.9'
|
||||
RestrictNetworkInterfaces=veth0-altname-with-more-than-15-chars
|
||||
RestrictNetworkInterfaces=veth1-altname-with-more-than-15-chars
|
||||
Type=oneshot
|
||||
@@ -17,6 +17,7 @@ setup() {
|
||||
ip -n "ns${i}" link set dev lo up
|
||||
ip -n "ns${i}" addr add "192.168.113."$((4*i+1))/30 dev "veth${i}_"
|
||||
ip link set dev "veth${i}" up
|
||||
ip link property add dev "veth${i}" altname "veth${i}-altname-with-more-than-15-chars"
|
||||
ip addr add "192.168.113."$((4*i+2))/30 dev "veth${i}"
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user