mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
network/veth: refuse when peer and the main interface names are equivalent
This commit is contained in:
parent
c60cd572bd
commit
98fbb3b5b0
@ -62,6 +62,10 @@ static int netdev_veth_verify(NetDev *netdev, const char *filename) {
|
||||
"Veth NetDev without peer name configured in %s. Ignoring",
|
||||
filename);
|
||||
|
||||
if (streq(v->ifname_peer, netdev->ifname))
|
||||
return log_netdev_warning_errno(netdev, SYNTHETIC_ERRNO(EINVAL),
|
||||
"Veth peer name cannot be the same as the main interface name.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user