From: Michal Sekletar Date: Tue, 14 Nov 2017 18:29:37 +0000 (+0100) Subject: udev: net_setup_link: don't error out when we couldn't apply link config (#7328) X-Git-Tag: v236~216 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56692c5dbc89137e78b02007b6580c7c3e974518;p=thirdparty%2Fsystemd.git udev: net_setup_link: don't error out when we couldn't apply link config (#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 --- diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c index 8e477751358..291f4dad488 100644 --- a/src/udev/udev-builtin-net_setup_link.c +++ b/src/udev/udev-builtin-net_setup_link.c @@ -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);