conntrack: Fix missing tracking for udp conn

This commit is contained in:
armv9 2023-03-31 10:40:08 +00:00 committed by 世界
parent 35f03f092d
commit f8be484019
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -154,9 +154,9 @@ func (d *DefaultDialer) DialContext(ctx context.Context, network string, address
switch N.NetworkName(network) {
case N.NetworkUDP:
if !address.IsIPv6() {
return d.udpDialer4.DialContext(ctx, network, address.String())
return trackConn(d.udpDialer4.DialContext(ctx, network, address.String()))
} else {
return d.udpDialer6.DialContext(ctx, network, address.String())
return trackConn(d.udpDialer6.DialContext(ctx, network, address.String()))
}
}
if !address.IsIPv6() {