Handshake packet can contain APPLICATION_CLOSE frame
@@ -3409,6 +3409,12 @@ static ssize_t conn_recv_handshake_pkt(ngtcp2_conn *conn, const uint8_t *pkt,
case NGTCP2_FRAME_CONNECTION_CLOSE:
conn_recv_connection_close(conn);
break;
+ case NGTCP2_FRAME_APPLICATION_CLOSE:
+ if (fr->type != NGTCP2_PKT_HANDSHAKE) {
+ return NGTCP2_ERR_PROTO;
+ }
+ conn_recv_connection_close(conn);
+ break;
case NGTCP2_FRAME_PING:
require_ack = 1;
break;
@@ -4138,6 +4144,13 @@ static int conn_recv_delayed_handshake_pkt(ngtcp2_conn *conn,
/* TODO What should I do if we get this in delayed
Initial/Handshake? */
break;
+ case NGTCP2_FRAME_APPLICATION_CLOSE:
+ if (hd->type != NGTCP2_PKT_HANDSHAKE) {
+ return NGTCP2_ERR_PROTO;
+ }
+ /* TODO What should I do if we get this in delayed
+ Initial/Handshake? */
+ break;
case NGTCP2_FRAME_CRYPTO:
case NGTCP2_FRAME_PING:
require_ack = 1;
