Skip to content

Commit

Permalink
udev: net_setup_link: don't error out when we couldn't apply link con…
Browse files Browse the repository at this point in the history
…fig (systemd#7328)

It is possible that kernel will reject our netlink message that
configures the link. However, we should always make sure that interface
will be named properly otherwise we can leave interfaces having
unpredictable kernel names. Thus we don't return early and continue to
export name and link file properties.

Suggested-by: Tom Gundersen <teg@jklm.no>
  • Loading branch information
msekletar authored and poettering committed Nov 14, 2017
1 parent 9efebb6 commit 56692c5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/udev/udev-builtin-net_setup_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv
}

r = link_config_apply(ctx, link, dev, &name);
if (r < 0) {
log_error_errno(r, "Could not apply link config to %s: %m", udev_device_get_sysname(dev));
return EXIT_FAILURE;
}
if (r < 0)
log_warning_errno(r, "Could not apply link config to %s, ignoring: %m", udev_device_get_sysname(dev));

udev_builtin_add_property(dev, test, "ID_NET_LINK_FILE", link->filename);

Expand Down

0 comments on commit 56692c5

Please sign in to comment.