diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-09-17 15:39:16 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-09-22 11:51:40 +0200 |
commit | af49810a6e08ed084294ce03e1c8a5efb8d1a705 (patch) | |
tree | 719dbe463ccfbfc54914869576b2f1bbcf4c6680 /vendor/github.com/vishvananda/netlink/route.go | |
parent | 8e2d25e93706190acf25bcf74bd18cdf98fb3a12 (diff) | |
download | podman-af49810a6e08ed084294ce03e1c8a5efb8d1a705.tar.gz podman-af49810a6e08ed084294ce03e1c8a5efb8d1a705.tar.bz2 podman-af49810a6e08ed084294ce03e1c8a5efb8d1a705.zip |
Bump CNI to v1.0.1
Update CNI so we can match wrapped errors. This should silence ENOENT
warnings when trying to read the cni conflist files.
Fixes #10926
Because CNI v1.0.0 contains breaking changes we have to change some
import paths. Also we cannot update the CNI version used for the
conflist files created by `podman network create` because this would
require at least containernetwork-plugins v1.0.1 and a updated dnsname
plugin. Because this will take a while until it lands in most distros
we should not use this version. So keep using v0.4.0 for now.
The update from checkpoint-restore/checkpointctl is also required to
make sure it no longer uses CNI to read the network status.
[NO TESTS NEEDED]
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'vendor/github.com/vishvananda/netlink/route.go')
-rw-r--r-- | vendor/github.com/vishvananda/netlink/route.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/vendor/github.com/vishvananda/netlink/route.go b/vendor/github.com/vishvananda/netlink/route.go index b16254174..845f41808 100644 --- a/vendor/github.com/vishvananda/netlink/route.go +++ b/vendor/github.com/vishvananda/netlink/route.go @@ -27,6 +27,9 @@ type Encap interface { Equal(Encap) bool } +//Protocol describe what was the originator of the route +type RouteProtocol int + // Route represents a netlink route. type Route struct { LinkIndex int @@ -36,7 +39,7 @@ type Route struct { Src net.IP Gw net.IP MultiPath []*NexthopInfo - Protocol int + Protocol RouteProtocol Priority int Table int Type int @@ -45,6 +48,7 @@ type Route struct { MPLSDst *int NewDst Destination Encap Encap + Via Destination MTU int Window int Rtt int @@ -79,6 +83,9 @@ func (r Route) String() string { if r.Encap != nil { elems = append(elems, fmt.Sprintf("Encap: %s", r.Encap)) } + if r.Via != nil { + elems = append(elems, fmt.Sprintf("Via: %s", r.Via)) + } elems = append(elems, fmt.Sprintf("Src: %s", r.Src)) if len(r.MultiPath) > 0 { elems = append(elems, fmt.Sprintf("Gw: %s", r.MultiPath)) @@ -107,6 +114,7 @@ func (r Route) Equal(x Route) bool { r.Flags == x.Flags && (r.MPLSDst == x.MPLSDst || (r.MPLSDst != nil && x.MPLSDst != nil && *r.MPLSDst == *x.MPLSDst)) && (r.NewDst == x.NewDst || (r.NewDst != nil && r.NewDst.Equal(x.NewDst))) && + (r.Via == x.Via || (r.Via != nil && r.Via.Equal(x.Via))) && (r.Encap == x.Encap || (r.Encap != nil && r.Encap.Equal(x.Encap))) } @@ -136,6 +144,7 @@ type NexthopInfo struct { Flags int NewDst Destination Encap Encap + Via Destination } func (n *NexthopInfo) String() string { @@ -147,6 +156,9 @@ func (n *NexthopInfo) String() string { if n.Encap != nil { elems = append(elems, fmt.Sprintf("Encap: %s", n.Encap)) } + if n.Via != nil { + elems = append(elems, fmt.Sprintf("Via: %s", n.Via)) + } elems = append(elems, fmt.Sprintf("Weight: %d", n.Hops+1)) elems = append(elems, fmt.Sprintf("Gw: %s", n.Gw)) elems = append(elems, fmt.Sprintf("Flags: %s", n.ListFlags())) |