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 <rzalamena@opensourcerouting.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
Renato Westphal 2019-10-30 19:23:41 -03:00
parent e13d98376d
commit a89241b42d

View File

@ -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