diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 985ba536dd15..c63d8d69b628 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -1759,7 +1759,8 @@ def startRouter(self, tgen=None): # Really want to use sysctl_atleast here, but only when MPLS is actually being # used - self.cmd("echo 100000 > /proc/sys/net/mpls/platform_labels") + if self.hasmpls: + self.cmd("echo 100000 > /proc/sys/net/mpls/platform_labels") if g_pytest_config.name_in_option_list(self.name, "--shell"): self.run_in_window(os.getenv("SHELL", "bash"), title="sh-%s" % self.name)