1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

network/vxcan: refuse when peer and the main interface names are equivalent

This commit is contained in:
Yu Watanabe 2024-09-10 03:01:14 +09:00
parent 2d5f58cf41
commit 971c0ce85c

View File

@ -38,6 +38,10 @@ static int netdev_vxcan_verify(NetDev *netdev, const char *filename) {
return log_netdev_warning_errno(netdev, SYNTHETIC_ERRNO(EINVAL),
"VxCan 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),
"VxCan peer name cannot be the same as the main interface name.");
return 0;
}