fix: udp listen use udp4 when general.ipv6 is false; general.ipv6 default value is true
This commit is contained in:
@ -57,6 +57,10 @@ func ListenPacket(ctx context.Context, network, address string, options ...Optio
|
||||
o(cfg)
|
||||
}
|
||||
|
||||
if DisableIPv6 {
|
||||
network = "udp4"
|
||||
}
|
||||
|
||||
lc := &net.ListenConfig{}
|
||||
if cfg.interfaceName != "" {
|
||||
addr, err := bindIfaceToListenConfig(cfg.interfaceName, lc, network, address)
|
||||
|
Reference in New Issue
Block a user