Skip to content
Snippets Groups Projects
Commit 27fabbd7 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Improve wildcard handling.

parent bf1c11aa
No related branches found
No related tags found
No related merge requests found
...@@ -1208,7 +1208,7 @@ sctp_state_cookie_parameter_new(s64 len, u8 *cookie) ...@@ -1208,7 +1208,7 @@ sctp_state_cookie_parameter_new(s64 len, u8 *cookie)
if (cookie != NULL) { if (cookie != NULL) {
memcpy(parameter->cookie, cookie, cookie_length); memcpy(parameter->cookie, cookie, cookie_length);
} else { } else {
/* flags |= FLAG_PARAMETER_VALUE_NOCHECK; */ flags |= FLAG_PARAMETER_VALUE_NOCHECK;
memset(parameter->cookie, 'A', cookie_length); memset(parameter->cookie, 'A', cookie_length);
} }
/* Clear the padding */ /* Clear the padding */
...@@ -1516,6 +1516,10 @@ new_sctp_packet(int address_family, ...@@ -1516,6 +1516,10 @@ new_sctp_packet(int address_family,
for (parameter_item = chunk_item->parameter_list->first; for (parameter_item = chunk_item->parameter_list->first;
parameter_item != NULL; parameter_item != NULL;
parameter_item = parameter_item->next) { parameter_item = parameter_item->next) {
if (ntohs(parameter_item->parameter->type) ==
SCTP_STATE_COOKIE_PARAMETER_TYPE) {
continue;
}
if (parameter_item->flags & FLAG_PARAMETER_LENGTH_NOCHECK) { if (parameter_item->flags & FLAG_PARAMETER_LENGTH_NOCHECK) {
asprintf(error, asprintf(error,
"parameter length must be specified for inbound packets"); "parameter length must be specified for inbound packets");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment