From d845e0ea1a821373b3f105c72542184aa1e3ca26 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Wed, 25 Apr 2018 11:11:50 +0200 Subject: prototypes: Change registration to IPCP Names were being registered layer-wide, which can give problems in the local testbed. This changes it to register with the IPCPs in the node instead. --- rumba/prototypes/ouroboros.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index 573e336..e72bcf1 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -150,11 +150,15 @@ class Experiment(mod.Experiment): cmd2 = "irm r n " + ipcp.name for dif_b in node.dif_registrations[ipcp.dif]: - cmd2 += " layer " + dif_b.name + for ipcp_b in node.ipcps: + if ipcp_b in dif_b.ipcps: + cmd2 += " ipcp " + ipcp_b.name cmds2.append(cmd2) cmd2 = "irm r n " + ipcp.dif.name for dif_b in node.dif_registrations[ipcp.dif]: - cmd2 += " layer " + dif_b.name + for ipcp_b in node.ipcps: + if ipcp_b in dif_b.ipcps: + cmd2 += " ipcp " + ipcp_b.name cmds2.append(cmd2) elif isinstance(ipcp.dif, mod.ShimUDPDIF): # FIXME: Will fail, since we don't keep IPs yet @@ -183,14 +187,18 @@ class Experiment(mod.Experiment): cmd = "irm r n " + ipcp.name for dif_b in e['enrollee'].node.dif_registrations[ipcp.dif]: - cmd += " layer " + dif_b.name + for ipcp_b in e['enrollee'].node.ipcps: + if ipcp_b in dif_b.ipcps: + cmd += " ipcp " + ipcp_b.name cmds.append(cmd) cmd = "irm i e n " + ipcp.name + " layer " + e['dif'].name + \ " autobind" cmds.append(cmd) cmd = "irm r n " + ipcp.dif.name for dif_b in e['enrollee'].node.dif_registrations[ipcp.dif]: - cmd += " layer " + dif_b.name + for ipcp_b in e['enrollee'].node.ipcps: + if ipcp_b in dif_b.ipcps: + cmd += " ipcp " + ipcp_b.name cmds.append(cmd) e['enrollee'].node.execute_commands(cmds, time_out=None) -- cgit v1.2.3