Latest iproute tool package has changed the help output for link
management. This output is parsed by NetConfigDeviceVlan class to check
support for VLANs.
(iproute-2.6.32)
# ip link help
Usage: ip link add link DEV [ name ] NAME
...
(iproute-3.3.0)
# ip link help
Usage: ip link add [link DEV] [ name ] NAME
...
Without the fix the VLANs are unusable with the
latest iproute package (3.3.0). I have tested the patch with both older
and new package version: iproute-2.6.32 and iproute-3.3.0.
---
NetConfig/NetConfigDevice.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/NetConfig/NetConfigDevice.py b/NetConfig/NetConfigDevice.py
index 8e89c36..6a81495 100644
--- a/NetConfig/NetConfigDevice.py
+++ b/NetConfig/NetConfigDevice.py
@@ -181,7 +181,7 @@ class NetConfigDeviceVlan(NetConfigDeviceGeneric):
output = exec_cmd("ip link help", die_on_err=False,
log_outputs=False)[1]
for line in output.split("\n"):
- if re.match(r'^.*ip link add link.*$', line):
+ if re.match(r'^.*ip link add [\[]{0,1}link.*$', line):
return True
return False
--
1.7.6.5
Show replies by date