]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd/sd-netlink/netlink-message.c
sd-netlink: respect attribute type flags 436/head
authorTom Gundersen <teg@jklm.no>
Tue, 23 Jun 2015 11:13:20 +0000 (13:13 +0200)
committerTom Gundersen <teg@jklm.no>
Tue, 30 Jun 2015 21:14:53 +0000 (23:14 +0200)
commit4c641e99fa1b32385b941cccccb566f5ddc9daed
tree344112b5974bb559377a82742d9a5e39604879c8
parent64ea3f926dfd43b52d7ef0399e44ce00587b5993
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