summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorRoelf Wichertjes <roelf@roelf.org>2017-04-30 13:12:32 +0200
committerLennart Poettering <lennart@poettering.net>2017-04-30 13:12:32 +0200
commit14b6bb776287e72887071dafae3d4c2c65ee926d (patch)
tree6f7369eec8143c0473674a44bdf234f494676e01 /src/network/networkd-link.c
parent2766d951c9385d91e504d968551247b115a77ef6 (diff)
networkd: Add check to ensure link is down before attempting to enslave (#5853)
netdev to bond. There are situations where a link can be in an "UP" state when systemd-networkd attempts to add the link to a bond device. This is a problem because the bonding driver will refuse to enslave a link if it is in the "UP" state. This check ensures systemd-networkd sets the link to "DOWN" before attempting to add the link to the bond. Fixes #5838.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 48ee12a317..6ed8380942 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1644,7 +1644,7 @@ static int link_up_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userda
return 1;
}
-static int link_up(Link *link) {
+int link_up(Link *link) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
uint8_t ipv6ll_mode;
int r;
@@ -1765,7 +1765,7 @@ static int link_down_handler(sd_netlink *rtnl, sd_netlink_message *m, void *user
return 1;
}
-static int link_down(Link *link) {
+int link_down(Link *link) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
int r;