summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-03-30 20:06:33 +0200
committerChristian Poessinger <christian@poessinger.com>2021-03-30 20:06:33 +0200
commit971ec5c1a50053b55bcd50843b380ec9ebd84552 (patch)
treef54cd30f7d4b15e521995aaacd4d452b4fbe835f /python
parent8a245b794ab1a004153eaef8bd0908ba86829d0d (diff)
downloadvyos-1x-971ec5c1a50053b55bcd50843b380ec9ebd84552.tar.gz
vyos-1x-971ec5c1a50053b55bcd50843b380ec9ebd84552.zip
xdp: T3448: bail out early on platforms not supporting xdp (e.g. RaspberryPi)
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/interface.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index a61985da5..ff05cab0e 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -1069,6 +1069,10 @@ class Interface(Control):
if not isinstance(state, bool):
raise ValueError("Value out of range")
+ # https://phabricator.vyos.net/T3448 - there is (yet) no RPI support for XDP
+ if not os.path.exists('/usr/sbin/xdp_loader'):
+ return
+
ifname = self.config['ifname']
cmd = f'xdp_loader -d {ifname} -U --auto-mode'
if state: