From 56692c5dbc89137e78b02007b6580c7c3e974518 Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Tue, 14 Nov 2017 19:29:37 +0100 Subject: [PATCH] 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 --- src/udev/udev-builtin-net_setup_link.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c index 8e47775..291f4da 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); -- 2.7.4