Skip to content

Commit

Permalink
USHIFT-3002: Add ipv6 to router address handling
Browse files Browse the repository at this point in the history
  • Loading branch information
pacevedom committed Jun 21, 2024
1 parent 71d9c6b commit 83e3818
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ var (
defaultRouterForbiddenCIDRs = []string{
"127.0.0.0/8",
"169.254.0.0/16",
"::1/128",
"fe80::/10",
}
)

Expand Down Expand Up @@ -489,7 +491,7 @@ func getHostAddresses() ([]net.IP, error) {
if link.Attrs().ParentIndex != 0 || link.Attrs().MasterIndex != 0 {
continue
}
addressList, err := handle.AddrList(link, netlink.FAMILY_V4)
addressList, err := handle.AddrList(link, netlink.FAMILY_ALL)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/loadbalancerservice/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func ipAddressesFromNIC(name string) ([]string, error) {
return nil, err
}

addrList, err := netlink.AddrList(link, netlink.FAMILY_V4)
addrList, err := netlink.AddrList(link, netlink.FAMILY_ALL)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 83e3818

Please sign in to comment.