Systemd/src/libsystemd/sd-netlink
David Herrmann 12b7dff45b sd-netlink: make sure the root-level type is nested
In sd-netlink-message, we always guarantee that the currently selected
type-system is non-NULL. Otherwise, we would be unable to parse any types
in the current container level. Hence, this assertion must be true:
    message->container_type_system[m->n_containers] != NULL

During message_new() we currently do not verify that this assertion is
true. Instead, we blindly access nl_type->type_system and use it (which
might be NULL for basic types and unions). Fix this, by explicitly
checking that the root-level type is nested.

Note that this is *not* a strict requirement of netlink, but it's a strict
requirement for all message types we currently support. Furthermore, all
the callers of message_new() already verify that only supported types are
passed, therefore, this is a pure cosmetic check. However, it might be
needed on the future, so make sure we don't trap into this once we change
the type-system.
2015-06-24 13:45:56 +02:00
..
local-addresses.c
local-addresses.h
Makefile
netlink-internal.h sd-netlink: socket - move some functions from main source file 2015-06-13 21:25:05 +02:00
netlink-message.c sd-netlink: make sure the root-level type is nested 2015-06-24 13:45:56 +02:00
netlink-socket.c sd-netlink: make NLType internal 2015-06-24 13:45:47 +02:00
netlink-types.c sd-netlink: drop NETLINK_TYPE_META 2015-06-24 13:45:56 +02:00
netlink-types.h sd-netlink: drop NETLINK_TYPE_META 2015-06-24 13:45:56 +02:00
netlink-util.c
netlink-util.h
rtnl-message.c sd-netlink: message - split up source file 2015-06-13 21:11:01 +02:00
sd-netlink.c sd-netlink: socket - move some functions from main source file 2015-06-13 21:25:05 +02:00
test-local-addresses.c
test-netlink.c