Commit 69be7d3d authored by Martín Ferrari's avatar Martín Ferrari

Manage change in iproute output for linked interfaces.

parent 60a471f6
......@@ -308,8 +308,9 @@ def get_if_data():
continue
match = re.search(r'^(\d+):\s+(.*)', line)
idx = int(match.group(1))
match = re.search(r'^(\d+): (\S+): <(\S+)> mtu (\d+) qdisc \S+' +
r'.*link/\S+(?: ([0-9a-f:]+) brd ([0-9a-f:]+))?', line)
match = re.search(r'^(\d+): ([^@\s]+)(?:@\S+)?: <(\S+)> mtu (\d+) '
r'qdisc \S+.*link/\S+(?: ([0-9a-f:]+) '
r'brd ([0-9a-f:]+))?', line)
flags = match.group(3).split(",")
i = interface(
index = match.group(1),
......@@ -431,7 +432,7 @@ def get_addr_data():
for line in ipdata.split("\n"):
if line == "":
continue
match = re.search(r'^(\d+):\s+(\S+):', line)
match = re.search(r'^(\d+):\s+([^@\s]+)(?:@\S+)?:', line)
if match:
# First line of output.
idx = int(match.group(1))
......
......@@ -12,7 +12,8 @@ def process_ipcmd(str):
if line == "":
cur = None
continue
match = re.search(r'^(\d+): (\S+): <(\S+)> mtu (\d+) qdisc (\S+)',
match = re.search(r'^(\d+): ([^@\s]+)(?:@\S+)?: <(\S+)> mtu (\d+) '
r'qdisc (\S+)',
line)
if match != None:
cur = match.group(2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment