sd-netlink: fix invalid assertion
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 15 Sep 2019 13:50:36 +0000 (22:50 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 21 Sep 2019 21:06:58 +0000 (23:06 +0200)
commita321507476af07b9ce743608a15156f2bc43da1d
treefc0b715a1faf6fc1e10b63121a31b9cec840c929
parent45dca7fe864d88edd366f15322c7a7d6bff32897
sd-netlink: fix invalid assertion

It is natural that n_attiributes is less than type. But in that case,
the message does not contain any message about the type. So, we should
not abort execution with assertion, but just return -ENODATA.

(cherry picked from commit 48fb0d1301c78112360df943f2b6ebeb545b8510)
src/libsystemd/sd-netlink/netlink-message.c