mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 11:18:16 +00:00
Updates after review
This commit is contained in:
@@ -30,12 +30,12 @@ import (
|
||||
|
||||
type netlinkHandle struct {
|
||||
netlink.Handle
|
||||
ipv6 bool
|
||||
isIPv6 bool
|
||||
}
|
||||
|
||||
// NewNetLinkHandle will crate a new NetLinkHandle
|
||||
func NewNetLinkHandle(ipv6 bool) NetLinkHandle {
|
||||
return &netlinkHandle{netlink.Handle{}, ipv6}
|
||||
func NewNetLinkHandle(isIPv6 bool) NetLinkHandle {
|
||||
return &netlinkHandle{netlink.Handle{}, isIPv6}
|
||||
}
|
||||
|
||||
// EnsureAddressBind checks if address is bound to the interface and, if not, binds it. If the address is already bound, return true.
|
||||
@@ -182,8 +182,8 @@ func (h *netlinkHandle) GetLocalAddresses(dev, filterDev string) (sets.String, e
|
||||
if route.LinkIndex == filterLinkIndex {
|
||||
continue
|
||||
}
|
||||
if h.ipv6 {
|
||||
if route.Dst.IP.To4() == nil && ! route.Dst.IP.IsLinkLocalUnicast() {
|
||||
if h.isIPv6 {
|
||||
if route.Dst.IP.To4() == nil && !route.Dst.IP.IsLinkLocalUnicast() {
|
||||
res.Insert(route.Dst.IP.String())
|
||||
}
|
||||
} else if route.Src != nil {
|
||||
|
||||
Reference in New Issue
Block a user