Thu, Oct 21, 2021 at 06:29:10PM CEST, pauldsmith(a)microsoft.com wrote:
From 89914e67018bdb8dfed5db1f7ddf7f39c7d1a493 Mon Sep 17 00:00:00
2001
From: "Paul D.Smith" <paul.d.smith(a)metaswitch.com>
Date: Thu, 21 Oct 2021 17:28:01 +0100
Subject: [patch libteam] ifindex zero cannot identify interface.
This is very short patch description. Could you please describe why this
change is needed, what actual issue does this cause? Thanks!
>---
> binding/python/team/core.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/binding/python/team/core.py b/binding/python/team/core.py
>index 54161bf..b2fc5e8 100644
>--- a/binding/python/team/core.py
>+++ b/binding/python/team/core.py
>@@ -101,7 +101,8 @@ class TeamNetDevice(object):
> @ifindex.setter
> def ifindex(self, ifindex):
> self._ifindex = ifindex
>- self.ifname = self._conv.dev_ifname(ifindex)
>+ if ifindex:
>+ self.ifname = self._conv.dev_ifname(ifindex)
>
> def get_hwaddr(self):
> err, hwaddr = capi.team_hwaddr_get(self._th, self.ifindex, 6)
>--
>2.33.0.721.g106298f7f9