[systemd-commits] src/network
Tom Gundersen
tomegun at kemper.freedesktop.org
Fri Jan 3 09:26:53 PST 2014
src/network/networkd-manager.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 8b264404b6cc412d3a588ca1b54fd2c1b09c5270
Author: Tom Gundersen <teg at jklm.no>
Date: Fri Jan 3 18:27:26 2014 +0100
networkd: link hash uses 64, not 32 bit keys
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 7b0c5d7..4e2cf45 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -241,6 +241,7 @@ int manager_udev_listen(Manager *m) {
static int manager_rtnl_process_link(sd_rtnl *rtnl, sd_rtnl_message *message, void *userdata) {
Manager *m = userdata;
Link *link;
+ uint64_t ifindex_64;
int r, ifindex;
r = sd_rtnl_message_link_get_ifindex(message, &ifindex);
@@ -249,9 +250,10 @@ static int manager_rtnl_process_link(sd_rtnl *rtnl, sd_rtnl_message *message, vo
return 0;
}
- link = hashmap_get(m->links, &ifindex);
+ ifindex_64 = ifindex;
+ link = hashmap_get(m->links, &ifindex_64);
if (!link) {
- log_debug("received RTM_NEWLINK message for ifindex we are not tracking (%d)", ifindex);
+ log_debug("received RTM_NEWLINK message for untracked ifindex %d", ifindex);
return 0;
}
@@ -261,7 +263,7 @@ static int manager_rtnl_process_link(sd_rtnl *rtnl, sd_rtnl_message *message, vo
if (r < 0)
return 0;
} else
- log_debug("received RTM_NEWLINK message for link we are not managing (%d)", ifindex);
+ log_debug("%s: received RTM_NEWLINK message for unmanaged link", link->ifname);
return 1;
}
More information about the systemd-commits
mailing list