diff options
author | Thomas Haller <thaller@redhat.com> | 2017-02-27 16:32:15 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-02-27 16:32:15 (GMT) |
commit | 3261dc4009c05d8d3c8b924e6aeb309d15c5137d (patch) | |
tree | 56f511149c02cdfcebc71dfe391364b81593732f /lib/utils.c | |
parent | 83e10beabc4c55a917606e4bd13b7b85ddd1ebe2 (diff) | |
download | libnl-3261dc4009c05d8d3c8b924e6aeb309d15c5137d.zip libnl-3261dc4009c05d8d3c8b924e6aeb309d15c5137d.tar.gz libnl-3261dc4009c05d8d3c8b924e6aeb309d15c5137d.tar.bz2 |
xfrm: allow quering optional arguments from xfrmnl_sp_get_sec_ctx()
The previous API of xfrmnl_sp_get_sec_ctx() is totally broken,
as it requires all out-arguments to be set. The user can thus
not know how large the ctx_str buffer must be.
Fix the API by allowing all arguments to be optional. Thus,
a user can first query the size only, and then in a second
step query the ctx_str. Previous version are broken.
Diffstat (limited to 'lib/utils.c')
-rw-r--r-- | lib/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils.c b/lib/utils.c index 64e87b6..fb350d1 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -1212,7 +1212,7 @@ int nl_has_capability (int capability) NL_CAPABILITY_NL_RECVMSGS_PEEK_BY_DEFAULT), _NL_SET (3, NL_CAPABILITY_VERSION_3_2_29, - 0, + NL_CAPABILITY_XFRM_SP_SEC_CTX_LEN, 0, 0, 0, |