mirror of
https://github.com/minio/minio.git
synced 2024-12-23 21:55:53 -05:00
vrf: Fix testing for loopback coming from the address (#17372)
This commit is contained in:
parent
442c50ff00
commit
eba378e4a1
@ -73,6 +73,9 @@ func setTCPParametersFn(opts TCPOptions) func(network, address string, c syscall
|
||||
_ = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, unix.TCP_USER_TIMEOUT, opts.UserTimeout)
|
||||
|
||||
if opts.Interface != "" {
|
||||
if h, _, err := net.SplitHostPort(address); err == nil {
|
||||
address = h
|
||||
}
|
||||
// Create socket on specific vrf device.
|
||||
// To catch all kinds of special cases this filters specifically for loopback networks.
|
||||
if ip := net.ParseIP(address); ip != nil && !ip.IsLoopback() {
|
||||
|
Loading…
Reference in New Issue
Block a user