summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-03 15:21:03 +0200
committerTom Gundersen <teg@jklm.no>2015-04-03 15:35:07 +0200
commitcdfee94318506c9348f8c30b9b7a7c87ec75927c (patch)
treec9a7b3ef5c18aa26daed480664073b44c76ae9eb /src/network/networkd-link.c
parentaf672f03eccd2df655edb585af25f4b8f3e153ac (diff)
networkd: improve logging when processing links and addresses
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 437c59843e..3bd37d8087 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1853,11 +1853,14 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
if (r < 0) {
log_warning("rtnl: could not get message type");
return 0;
+ } else if (type != RTM_NEWADDR && type != RTM_DELADDR) {
+ log_warning("rtnl: received unexpected message type when processing address");
+ return 0;
}
r = sd_rtnl_message_addr_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 address: %m");
return 0;
} else if (ifindex <= 0) {
log_warning("rtnl: received address message with invalid ifindex: %d", ifindex);