While looking at ELL's generic netlink code, I noticed that l_genl_new() is
part of the public API but it's not clear if the returned struct l_genl
instance is fully usable since its pid field isn't set as in
l_genl_new_default(), and since there's is no way to set it afterward.
This could result in the underlying sockaddr_nl nl_pid field being
different from l_genl's pid field (zero in this case). Is that correct?
I pushed an update to the ell-key-crypto branch here:
It's a merge of v4.13.8 and linux-fs/keys-asym-keyctl, which I've tested
with ELL's unit tests.
The previous v4.12.1 merge is tagged as ell-key-crypto-412 in the same
This set of patches makes the iovec parameter of
l_genl_msg_append_attrv() function const since it isn't modified by
that function. This allows a pointer to a const struct iovec to be
passed as an argument without casting away the const. Of course, a
pointer to a non-const iovec may still be passed without a cast as
well. A new unit test for l_genl_msg_append_attrv() is also added.
Ossama Othman (2):
genl: Make iovec parameter const
unit: Added test for l_genl_msg_append_attrv()
ell/genl.c | 3 ++-
ell/genl.h | 2 +-
unit/test-genl-msg.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 2 deletions(-)