autobahn extend max ping pong close payload to 125

We only supported those specific control packet payloads up to 124.
125 is the correct limit.

Lws was consistent about the wrong limit so there are no other
issues.  It doesn't affect user ABI correcting it either.

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-12-28 13:40:54 +08:00
parent 41434fad53
commit 7dbf21efc2
3 changed files with 3 additions and 3 deletions

View file

@ -309,7 +309,7 @@ spill:
}
/* control packets can only be < 128 bytes long */
if (wsi->u.ws.rx_user_buffer_head > 128 - 4) {
if (wsi->u.ws.rx_user_buffer_head > 128 - 3) {
lwsl_parser("DROP PING payload too large\n");
goto ping_drop;
}

View file

@ -1025,7 +1025,7 @@ spill:
}
process_as_ping:
/* control packets can only be < 128 bytes long */
if (wsi->u.ws.rx_user_buffer_head > 128 - 4) {
if (wsi->u.ws.rx_user_buffer_head > 128 - 3) {
lwsl_parser("DROP PING payload too large\n");
goto ping_drop;
}

View file

@ -839,7 +839,7 @@ struct _lws_websocket_related {
unsigned int rx_user_buffer_head;
unsigned char mask_nonce[4];
/* Also used for close content... control opcode == < 128 */
unsigned char ping_payload_buf[128 - 4 + LWS_SEND_BUFFER_PRE_PADDING];
unsigned char ping_payload_buf[128 - 3 + LWS_SEND_BUFFER_PRE_PADDING];
unsigned char ping_payload_len;
unsigned char frame_mask_index;