summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-14 18:47:49 +0100
committerGitHub <noreply@github.com>2023-12-14 18:47:49 +0100
commit2de7be332634c19368f77d52aae0239f6e3c1727 (patch)
treeafcba5a6b9a2945ad81b2c6a0460e9a5004efde8
parent4508fb22454e430fbd2040f37bdb75dbc4f6f68a (diff)
parent2ebac5af10a36668ed3b8cfa6e5a9f61cf5d1068 (diff)
downloadvyos-1x-2de7be332634c19368f77d52aae0239f6e3c1727.tar.gz
vyos-1x-2de7be332634c19368f77d52aae0239f6e3c1727.zip
Merge pull request #2635 from sever-sever/T5749
T5749: Add a more scrict search for get_vrf method
-rw-r--r--python/vyos/ifconfig/interface.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index 1586710db..56dcde214 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -115,7 +115,7 @@ class Interface(Control):
},
'vrf': {
'shellcmd': 'ip -json -detail link list dev {ifname}',
- 'format': lambda j: jmespath.search('[*].master | [0]', json.loads(j)),
+ 'format': lambda j: jmespath.search('[?linkinfo.info_slave_kind == `vrf`].master | [0]', json.loads(j)),
},
}