mirror of
https://gitee.com/openharmony/third_party_libnl
synced 2024-11-30 13:40:43 +00:00
update sp_attr condition in build_xfrm_sp_message
Identification of policy are possible with: 1. direction and index 2. direction and selector Theoretically second one needs a security context, but non existing context is valid too.
This commit is contained in:
parent
7efe45f96d
commit
2c5b92dfaf
@ -765,7 +765,9 @@ static int build_xfrm_sp_message(struct xfrmnl_sp *tmpl, int cmd, int flags, str
|
||||
uint32_t len;
|
||||
struct nl_addr* addr;
|
||||
|
||||
if (!(tmpl->ce_mask & XFRM_SP_ATTR_DIR))
|
||||
if (!(tmpl->ce_mask & XFRM_SP_ATTR_DIR) &&
|
||||
(!(tmpl->ce_mask & XFRM_SP_ATTR_INDEX) ||
|
||||
!(tmpl->ce_mask & XFRM_SP_ATTR_SEL)))
|
||||
return -NLE_MISSING_ATTR;
|
||||
|
||||
memset ((void*)&sp_info, 0, sizeof (sp_info));
|
||||
|
Loading…
Reference in New Issue
Block a user