Tue, Sep 27, 2022 at 10:32:02AM CEST, jiri(a)resnulli.us wrote:
Tue, Jul 05, 2022 at 10:10:55AM CEST, pauldsmith(a)microsoft.com wrote:
>From 89914e67018bdb8dfed5db1f7ddf7f39c7d1a493 Mon Sep 17 00:00:00 2001
>From: "Paul D.Smith"
paul.d.smith@metaswitch.com<mailto:paul.d.smith@metaswitch.com>
>Date: Thu, 21 Oct 2021 17:28:01 +0100
>Subject: [PATCH] ifindex zero cannot identify interface.
This is very odd. Next time, could you please send git-send-email?
Thanks!
Applied with manual changes to fix the email formatting.
Actually, scratch that. There is no signed off line.
Please send a proper patch with git-send-email with proper signed off
line.
Thanks!
>
>>
>>---
>>binding/python/team/core.py | 3 ++-
>>1 file changed, 2 insertions(+), 1 deletion(-)
>>
>>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. Patch alters
>>libteam processing order to ensure that this is the case.
>>
>>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.34.0.rc0
>>