Skip to content

Commit

Permalink
Improve dualStack log
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Buil <mbuil@suse.com>
  • Loading branch information
manuelbuil committed Nov 17, 2023
1 parent fd676a5 commit 8cf46ed
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/agent/flannel/flannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,11 @@ func LookupExtInterface(iface *net.Interface, netMode int) (*backend.ExternalInt
if err != nil {
return nil, fmt.Errorf("failed to find IPv4 address for interface %s", iface.Name)
}
logrus.Infof("The interface %s with ipv4 address %s will be used by flannel", iface.Name, ifaceAddr[0])
ifacev6Addr, err = ip.GetInterfaceIP6Addrs(iface)
if err != nil {
return nil, fmt.Errorf("failed to find IPv6 address for interface %s", iface.Name)
}
logrus.Infof("Using dual-stack mode. The ipv6 address %s will be used by flannel", ifacev6Addr[0])
logrus.Infof("Using dual-stack mode. The interface %s with ipv4 address %s and ipv6 address %s will be used by flannel", iface.Name, ifaceAddr[0], ifacev6Addr[0])
default:
ifaceAddr = append(ifaceAddr, nil)
ifacev6Addr = append(ifacev6Addr, nil)
Expand Down

0 comments on commit 8cf46ed

Please sign in to comment.