summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/interface.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index 33b643e7e..a416de1ab 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -1617,7 +1617,7 @@ class Interface(Control):
if 'netns' in self.config:
return None
- source_if = self.config['ifname']
+ source_if = self.ifname
mirror_config = None
if 'mirror' in self.config:
@@ -1631,8 +1631,8 @@ class Interface(Control):
# clear existing ingess - ignore errors (e.g. "Error: Cannot find specified
# qdisc on specified device") - we simply cleanup all stuff here
if not 'qos' in self.config:
- self._popen(f'tc qdisc del dev {source_if} parent ffff: 2>/dev/null');
- self._popen(f'tc qdisc del dev {source_if} parent 1: 2>/dev/null');
+ self._popen(f'tc qdisc del dev {source_if} root 2>/dev/null')
+ self._popen(f'tc qdisc del dev {source_if} ingress 2>/dev/null')
# Apply interface mirror policy
if mirror_config:
@@ -1644,14 +1644,14 @@ class Interface(Control):
handle = '1: root prio'
parent = '1:'
- # Mirror egress traffic
+ # Mirror traffic
mirror_cmd = f'tc qdisc add dev {source_if} handle {handle}; '
# Export the mirrored traffic to the interface
mirror_cmd += f'tc filter add dev {source_if} parent {parent} protocol '\
f'all prio 10 u32 match u32 0 0 flowid 1:1 action mirred '\
f'egress mirror dev {target_if}'
_, err = self._popen(mirror_cmd)
- if err: print('tc qdisc(filter for mirror port failed')
+ if err: print('tc filter for mirror port failed')
# Apply interface traffic redirection policy
elif 'redirect' in self.config:
@@ -1662,7 +1662,7 @@ class Interface(Control):
_, err = self._popen(f'tc filter add dev {source_if} parent ffff: protocol '\
f'all prio 10 u32 match u32 0 0 flowid 1:1 action mirred '\
f'egress redirect dev {target_if}')
- if err: print('tc filter add for redirect failed')
+ if err: print('tc filter for redirect failed')
def set_per_client_thread(self, enable):
"""