]> granicus.if.org Git - libnl/commitdiff
fix build_xfrm_sp_message index condition
authorSimon Buttgereit <simon.buttgereit@gmail.com>
Mon, 6 Feb 2017 17:43:31 +0000 (18:43 +0100)
committerThomas Haller <thaller@redhat.com>
Mon, 27 Feb 2017 15:43:48 +0000 (16:43 +0100)
Index is not needed and not known if adding a policy. Seems to be copied from
build_xfrm_sp_delete_message.

lib/xfrm/sp.c

index 85581504b966bbd6af40beb77c9d653fed33cafa..87b4abe9f59016bfdbe97b31c0d98b72cbb0ec88 100644 (file)
@@ -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));