commit a5337344710f7e5592074510038756934d7d77ce
parent 5dbccee798861b10fcca04ec311296c47cab0f7b
Author: Denis Kenzior <denkenz@gmail.com>
Date: Thu, 17 Oct 2019 17:38:53 -0500
p2putil: Fix logic in required attribute check
The logic here intended to check whether all required attributes were
available. However, it set the parse_error to true instead of
have_required to false as intended.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/p2putil.c b/src/p2putil.c
@@ -720,7 +720,7 @@ static int p2p_parse_attrs(const uint8_t *pdu, size_t len, int type, ...)
entry = e->data;
if (!entry->present && (entry->flags & ATTR_FLAG_REQUIRED)) {
- parse_error = true;
+ have_required = false;
goto done;
}
}