diff options
author | DaniilHarun <harunaga@harunaga.ru> | 2022-07-14 17:18:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-14 17:18:48 +0300 |
commit | 2e6d765e332e172fc19c75b471deb868b5025bdd (patch) | |
tree | 97fa753ae36427a6159c4019ebda2d28d86b7066 | |
parent | 8cda11b4b12850a3a0378cb9705327d4e9b283ca (diff) | |
download | vyos-1x-2e6d765e332e172fc19c75b471deb868b5025bdd.tar.gz vyos-1x-2e6d765e332e172fc19c75b471deb868b5025bdd.zip |
interface: T4056: Fix unexpected delete tc qdisc
-rw-r--r-- | python/vyos/ifconfig/interface.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index 33a7f9a2d..b9001d1f2 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -1319,8 +1319,9 @@ class Interface(Control): # clear existing ingess - ignore errors (e.g. "Error: Cannot find specified # qdisc on specified device") - we simply cleanup all stuff here - 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'); + if not 'traffic_policy' 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'); # Apply interface mirror policy if mirror_config: |