mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
networkd-link: link_configure(); factor out link_configure_can() into separate function
This commit is contained in:
parent
c07b23ca7e
commit
93ea77505e
@ -2599,6 +2599,20 @@ static int link_update_lldp(Link *link) {
|
||||
return r;
|
||||
}
|
||||
|
||||
static int link_configure_can(Link *link) {
|
||||
int r;
|
||||
|
||||
if (!(link->flags & IFF_UP)) {
|
||||
r = link_up_can(link);
|
||||
if (r < 0) {
|
||||
link_enter_failed(link);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int link_configure(Link *link) {
|
||||
int r;
|
||||
|
||||
@ -2606,18 +2620,8 @@ static int link_configure(Link *link) {
|
||||
assert(link->network);
|
||||
assert(link->state == LINK_STATE_PENDING);
|
||||
|
||||
if (streq_ptr(link->kind, "vcan")) {
|
||||
|
||||
if (!(link->flags & IFF_UP)) {
|
||||
r = link_up_can(link);
|
||||
if (r < 0) {
|
||||
link_enter_failed(link);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
if (streq_ptr(link->kind, "vcan"))
|
||||
return link_configure_can(link);
|
||||
|
||||
/* Drop foreign config, but ignore loopback or critical devices.
|
||||
* We do not want to remove loopback address or addresses used for root NFS. */
|
||||
|
Loading…
Reference in New Issue
Block a user