summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-14 19:10:47 +0100
committerGitHub <noreply@github.com>2023-12-14 19:10:47 +0100
commitdf285b1a0743e23ff110fdd7a8a24d8b4cd568db (patch)
tree98e686854e11c41112c8757af75105420d7a3c45
parentb225192d74d1080689d3d725079e77de3ff2a742 (diff)
parenta6d1af3c943600e971662b5b8992a576804ec060 (diff)
downloadvyos-1x-df285b1a0743e23ff110fdd7a8a24d8b4cd568db.tar.gz
vyos-1x-df285b1a0743e23ff110fdd7a8a24d8b4cd568db.zip
Merge pull request #2636 from vyos/mergify/bp/sagitta/pr-2635
T5749: Add a more scrict search for get_vrf method (backport #2635)
-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 8783ccc1e..a038ef28d 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -113,7 +113,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)),
},
}