projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d5f58c
)
network/vxcan: refuse when peer and the main interface names are equivalent
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 9 Sep 2024 18:01:14 +0000
(
03:01
+0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 10 Sep 2024 10:30:17 +0000
(19:30 +0900)
src/network/netdev/vxcan.c
patch
|
blob
|
history
diff --git
a/src/network/netdev/vxcan.c
b/src/network/netdev/vxcan.c
index c0343f45b62171cb2e33920dfc185aa23dfdd9bc..c129d24734f1d08d05b4453bb3b1920b99034b1c 100644
(file)
--- a/
src/network/netdev/vxcan.c
+++ b/
src/network/netdev/vxcan.c
@@
-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;
}