summaryrefslogtreecommitdiff
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r--src/network/networkd-manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index cffae835f5..0e204ebae6 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -299,11 +299,14 @@ static int manager_rtnl_process_link(sd_rtnl *rtnl, sd_rtnl_message *message, vo
if (r < 0) {
log_warning_errno(r, "rtnl: could not get message type: %m");
return 0;
+ } else if (type != RTM_NEWLINK && type != RTM_DELLINK) {
+ log_warning("rtnl: received unexpected message type when processing link");
+ return 0;
}
r = sd_rtnl_message_link_get_ifindex(message, &ifindex);
if (r < 0) {
- log_warning_errno(r, "rtnl: could not get ifindex: %m");
+ log_warning_errno(r, "rtnl: could not get ifindex from link: %m");
return 0;
} else if (ifindex <= 0) {
log_warning("rtnl: received link message with invalid ifindex: %d", ifindex);