diff --git a/cmd/router/bin/route_add.go b/cmd/router/bin/route_add.go index dc2a334..459cdf5 100644 --- a/cmd/router/bin/route_add.go +++ b/cmd/router/bin/route_add.go @@ -2,7 +2,6 @@ package bin import ( "encoding/json" - "fmt" "github.com/Inspur-Data/ipamwrapper/pkg/logging" "github.com/containernetworking/plugins/pkg/ns" "github.com/vishvananda/netlink" @@ -75,10 +74,10 @@ func CmdAdd(args *skel.CmdArgs) (err error) { //var v6Gw net.IP logging.Debugf("ifName :%v", args.IfName) // get ip by interface name - link, err := netlink.LinkByName(args.IfName) + /*link, err := netlink.LinkByName(args.IfName) if err != nil { return logging.Errorf("Failed to get link:", err.Error()) - } + }*/ // 获取 IP 地址列表 /*addrs, err := netlink.AddrList(link, netlink.FAMILY_V4)