1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

ifupdown.utils: fix itf range in argument

ifquery excluded the last digit of interfaces range given.
ex: eth[1-2] would give only eth1 instead of eth1 + eth2.

This commit fix this behavior by increasing the range in
expand_iface_range.
This commit is contained in:
Adrien Banlin
2023-06-12 10:36:00 +02:00
parent d5f0e51d22
commit 7cebbec155

View File

@@ -261,7 +261,7 @@ class utils():
return []
prefix, start, end = ifrange[0], ifrange[1], ifrange[2]
suffix = '' if len(ifrange) <= 3 else ifrange[3]
return [f'{prefix}{i}{suffix}' for i in range(start, end)]
return [f'{prefix}{i}{suffix}' for i in range(start, end + 1)]
@classmethod
def is_ifname_range(cls, name):