Ignore Version Negotiation packet after handshake
@@ -2084,13 +2084,12 @@ static int conn_recv_pkt(ngtcp2_conn *conn, uint8_t *pkt, size_t pktlen,
encrypted = 1;
break;
case NGTCP2_PKT_VERSION_NEGOTIATION:
- /* TODO Not sure we have to handle Version Negotiation packet
- after handshake. */
+ /* Parse, and ignore Version Negotiation packet after
+ handshake */
rv = conn_on_version_negotiation(conn, &hd, pkt, pktlen);
if (rv < 0) {
return rv;
}
- conn->state = NGTCP2_CS_CLOSE_WAIT;
return 0;
}
} else if (!(hd.flags & NGTCP2_PKT_FLAG_KEY_PHASE)) {
