Wed, Sep 28, 2022 at 12:00:18PM CEST, pauldsmith(a)microsoft.com wrote:
Signed-off-by: "Paul D.Smith"
<pauldsmith(a)microsoft.com>
On some platforms, libraries underpinning libteam assert that an ifindex
passed to them is not zero so an ifindex of zero cannot be passed down.
This patch alters libteam processing order to ensure that this is the
case.
Placed signed off line here where it belongs, adjusted subject a bit and
applied.
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..b8569f9 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 self.ifindex:
>+ self.ifname = self._conv.dev_ifname(ifindex)
>
> def get_hwaddr(self):
> err, hwaddr = capi.team_hwaddr_get(self._th, self.ifindex, 6)
>--
>2.37.3.windows.1
>