We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 87b791c + c3e55e4 commit cf89496Copy full SHA for cf89496
1 file changed
cmd/sdn-cni-plugin/openshift-sdn_linux.go
@@ -206,7 +206,13 @@ func (p *cniPlugin) CmdAdd(args *skel.CmdArgs) error {
206
// add a route to that via the SDN
207
var addrs []netlink.Addr
208
err = hostNS.Do(func(ns.NetNS) error {
209
- parent, err := netlink.LinkByIndex(link.Attrs().ParentIndex)
+ // workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1705686
210
+ parentIndex := link.Attrs().ParentIndex
211
+ if parentIndex == 0 {
212
+ parentIndex = link.Attrs().Index
213
+ }
214
+
215
+ parent, err := netlink.LinkByIndex(parentIndex)
216
if err != nil {
217
return err
218
}
0 commit comments