summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-netlink/netlink-socket.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-06-25 13:02:53 +0200
committerTom Gundersen <teg@jklm.no>2015-06-25 13:02:53 +0200
commit3dfc034b4d46f67d6eda8801f1d4be26c37ab0b7 (patch)
tree38b1d3d8071d40d704428a549040f044cf1b7595 /src/libsystemd/sd-netlink/netlink-socket.c
parent9124468a5e5664e9fb7ca448021a6d8ea8ec4aeb (diff)
parentdd906398dd0aa8582bdba519a2026278359c2888 (diff)
Merge pull request #355 from dvdhrm/netlink
sd-netlink cleanups
Diffstat (limited to 'src/libsystemd/sd-netlink/netlink-socket.c')
-rw-r--r--src/libsystemd/sd-netlink/netlink-socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-socket.c b/src/libsystemd/sd-netlink/netlink-socket.c
index 8136cf36ae..84ff7c38c9 100644
--- a/src/libsystemd/sd-netlink/netlink-socket.c
+++ b/src/libsystemd/sd-netlink/netlink-socket.c
@@ -243,7 +243,7 @@ int socket_read_message(sd_netlink *rtnl) {
}
/* check that we support this message type */
- r = type_system_get_type(NULL, &nl_type, new_msg->nlmsg_type);
+ r = type_system_get_type(&type_system_root, &nl_type, new_msg->nlmsg_type);
if (r < 0) {
if (r == -EOPNOTSUPP)
log_debug("sd-netlink: ignored message with unknown type: %i",
@@ -253,7 +253,7 @@ int socket_read_message(sd_netlink *rtnl) {
}
/* check that the size matches the message type */
- if (new_msg->nlmsg_len < NLMSG_LENGTH(nl_type->size)) {
+ if (new_msg->nlmsg_len < NLMSG_LENGTH(type_get_size(nl_type))) {
log_debug("sd-netlink: message larger than expected, dropping");
continue;
}