aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-04-25 11:11:50 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2018-04-25 11:11:50 +0200
commitd845e0ea1a821373b3f105c72542184aa1e3ca26 (patch)
tree5b75ed57beea4e4c320dec3c3a2d418dcf7fde5a
parent865596357af3d8ea20333c756881e00c4a6106fb (diff)
downloadrumba-d845e0ea1a821373b3f105c72542184aa1e3ca26.tar.gz
rumba-d845e0ea1a821373b3f105c72542184aa1e3ca26.zip
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.
-rw-r--r--rumba/prototypes/ouroboros.py16
1 files 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)