conntrack: Fix missing tracking for udp conn

This commit is contained in:
armv9 2023-03-31 10:40:08 +00:00 committed by 世界
parent 3b64aec557
commit 0840fb1a28
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) { switch N.NetworkName(network) {
case N.NetworkUDP: case N.NetworkUDP:
if !address.IsIPv6() { if !address.IsIPv6() {
return d.udpDialer4.DialContext(ctx, network, address.String()) return trackConn(d.udpDialer4.DialContext(ctx, network, address.String()))
} else { } else {
return d.udpDialer6.DialContext(ctx, network, address.String()) return trackConn(d.udpDialer6.DialContext(ctx, network, address.String()))
} }
} }
if !address.IsIPv6() { if !address.IsIPv6() {