summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSimon Buttgereit <simon.buttgereit@gmail.com>2017-02-06 17:43:31 (GMT)
committerThomas Haller <thaller@redhat.com>2017-02-27 15:43:48 (GMT)
commit0704cd93f5d314a598def8b28732e145d0ebf85a (patch)
tree851b5301399318c93ba3be023d9e35074a2da33d /lib
parent9b22e310cec08e8a89f7e05dc7b69fa20085034c (diff)
downloadlibnl-0704cd93f5d314a598def8b28732e145d0ebf85a.zip
libnl-0704cd93f5d314a598def8b28732e145d0ebf85a.tar.gz
libnl-0704cd93f5d314a598def8b28732e145d0ebf85a.tar.bz2
fix build_xfrm_sp_message index condition
Index is not needed and not known if adding a policy. Seems to be copied from build_xfrm_sp_delete_message.
Diffstat (limited to 'lib')
-rw-r--r--lib/xfrm/sp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/xfrm/sp.c b/lib/xfrm/sp.c
index 8558150..87b4abe 100644
--- a/lib/xfrm/sp.c
+++ b/lib/xfrm/sp.c
@@ -765,8 +765,7 @@ 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_INDEX) ||
- !(tmpl->ce_mask & XFRM_SP_ATTR_DIR))
+ if (!(tmpl->ce_mask & XFRM_SP_ATTR_DIR))
return -NLE_MISSING_ATTR;
memset ((void*)&sp_info, 0, sizeof (sp_info));