2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-15 12:17:47 +00:00

Avoid enumerating members of a bond

Various parts of confluent that go to try to use
all the interfaces will now skip bond members.

One example problem is that joining the SSDP multicast
group for SSDP would cause the kernel to IGMPv6 out
on bond members as well as the bond itself.  This change
ensures that the bond interface is only used and never
bypassed.
This commit is contained in:
Jarrod Johnson 2022-10-07 08:52:02 -04:00
parent a77f211b8e
commit 4fed609050

View File

@ -63,6 +63,8 @@ def list_interface_indexes():
for iface in os.listdir('/sys/class/net/'):
if not os.path.exists('/sys/class/net/{0}/ifindex'.format(iface)):
continue
if os.path.exists('/sys/class/net/{0}/bonding_slave'.format(iface)):
continue
ifile = open('/sys/class/net/{0}/ifindex'.format(iface), 'r')
intidx = int(ifile.read())
ifile.close()