chiark / gitweb /
sd-netlink: respect attribute type flags
authorTom Gundersen <teg@jklm.no>
Tue, 23 Jun 2015 11:13:20 +0000 (13:13 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:04:58 +0000 (10:04 +0100)
commitd29820f2a37d7fe1bccebfd83abbfd13e904af34
tree4eb1745e6cccf5346120eeb7edb463cfaa5f68dd
parent2f80599e296658b1322d9dca08adee57fde8a8e3
sd-netlink: respect attribute type flags

Though currently unused by us, netlink attribute types support embedding flags to indicate
if the type is encoded in network byte-order and if it is a nested attribute. Read out
these flags when parsing the message.

We will now swap the byteorder in case it is non-native when reading out integers (though
this is not needed by any of the types we currently support). We do not enforce the NESTED
flag, as the kernel gets this wrong in many cases.
src/libsystemd/sd-netlink/netlink-internal.h
src/libsystemd/sd-netlink/netlink-message.c