mpExperience: don't set priority on paths if they are the same

This commit is contained in:
Quentin De Coninck 2016-05-13 10:06:52 +02:00
parent 9753f109b5
commit 2a94cc2ec7

View File

@ -40,16 +40,17 @@ class MpExperience:
if isinstance(self.mpTopo, MpMultiInterfaceTopo):
prioPath0 = self.xpParam.getParam(MpParamXp.PRIOPATH0)
prioPath1 = self.xpParam.getParam(MpParamXp.PRIOPATH1)
self.mpTopo.commandTo(self.mpConfig.client, "ip link set dev " +
self.mpConfig.getClientInterface(0) + "priority" + str(prioPath0))
self.mpTopo.commandTo(self.mpConfig.router, "ip link set dev " +
self.mpConfig.getRouterInterfaceSwitch(0) + "priority" +
str(prioPath0))
self.mpTopo.commandTo(self.mpConfig.client, "ip link set dev " +
self.mpConfig.getClientInterface(1) + "priority" + str(prioPath1))
self.mpTopo.commandTo(self.mpConfig.router, "ip link set dev " +
self.mpConfig.getRouterInterfaceSwitch(1) + "priority" +
str(prioPath1))
if not prioPath0 == prioPath1:
self.mpTopo.commandTo(self.mpConfig.client, "ip link set dev " +
self.mpConfig.getClientInterface(0) + "priority" + str(prioPath0))
self.mpTopo.commandTo(self.mpConfig.router, "ip link set dev " +
self.mpConfig.getRouterInterfaceSwitch(0) + "priority" +
str(prioPath0))
self.mpTopo.commandTo(self.mpConfig.client, "ip link set dev " +
self.mpConfig.getClientInterface(1) + "priority" + str(prioPath1))
self.mpTopo.commandTo(self.mpConfig.router, "ip link set dev " +
self.mpConfig.getRouterInterfaceSwitch(1) + "priority" +
str(prioPath1))
def runUserspacePM(self):
if self.xpParam.getParam(MpParamXp.KERNELPMC) != "netlink":