don't pass the QUIC version to the StartedConnection event

The version might change in response to a Version Negotiation packet.
This commit is contained in:
Marten Seemann
2021-03-21 18:05:05 +08:00
parent ea14ce5724
commit c30a45ef6f
14 changed files with 34 additions and 47 deletions

View File

@@ -59,11 +59,8 @@ type eventConnectionStarted struct {
SrcAddr *net.UDPAddr
DestAddr *net.UDPAddr
Version protocol.VersionNumber
SrcConnectionID protocol.ConnectionID
DestConnectionID protocol.ConnectionID
// TODO: add ALPN
}
var _ eventDetails = &eventConnectionStarted{}
@@ -82,7 +79,6 @@ func (e eventConnectionStarted) MarshalJSONObject(enc *gojay.Encoder) {
enc.IntKey("src_port", e.SrcAddr.Port)
enc.StringKey("dst_ip", e.DestAddr.IP.String())
enc.IntKey("dst_port", e.DestAddr.Port)
enc.StringKey("quic_version", versionNumber(e.Version).String())
enc.StringKey("src_cid", connectionID(e.SrcConnectionID).String())
enc.StringKey("dst_cid", connectionID(e.DestConnectionID).String())
}