From a89241b42d488ada10d11b7d85f1bcf994bdd3df Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Wed, 30 Oct 2019 19:23:41 -0300 Subject: [PATCH] topotest: enable MPLS processing on all interfaces by default This is necessary to make some tests work correctly. Only topologies created using the topogen framework benefit from this change. Signed-off-by: Rafael Zalamena Signed-off-by: Renato Westphal --- tests/topotests/lib/topogen.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index d7145c3be0..6859f5a076 100644 --- a/tests/topotests/lib/topogen.py +++ b/tests/topotests/lib/topogen.py @@ -61,6 +61,7 @@ from mininet.cli import CLI from lib import topotest from lib.topolog import logger, logger_config +from lib.topotest import set_sysctl CWD = os.path.dirname(os.path.realpath(__file__)) @@ -676,6 +677,10 @@ class TopoRouter(TopoGear): if result != '': self.tgen.set_error(result) + else: + # Enable MPLS processing on all interfaces. + for interface in self.links.keys(): + set_sysctl(nrouter, 'net.mpls.conf.{}.input'.format(interface), 1) return result -- 2.39.5