aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Doan <daviddoan@Davids-MacBook-Pro-70.local>2023-11-08 17:33:32 -0500
committerDavid Doan <daviddoan@Davids-MacBook-Pro-70.local>2023-11-08 17:33:32 -0500
commit8345c70da5ca872916b2d524e83bbecbb7e24fae (patch)
tree258d4b2fa78da5308d787979d47989df778ea441
parent421cb40b2b533d24347f3fb07067c5c5a3708fba (diff)
parenta571eee893bc308a75e66f37f908752bb1cbb321 (diff)
Meerge branch 'main' of https://github.com/brown-cs1680-f23/iptcp-jailpt2
update
-rw-r--r--linear-r1h2/binaries.example.json11
-rw-r--r--linear-r1h2/nodes.json5
-rwxr-xr-xreference/arm64/vhostbin2421048 -> 2767416 bytes
-rwxr-xr-xreference/arm64/vrouterbin2421048 -> 2421048 bytes
-rwxr-xr-xreference/vhostbin2376088 -> 2734744 bytes
-rwxr-xr-xreference/vrouterbin2400664 -> 2400664 bytes
-rwxr-xr-xutil/vnet_generate1
-rwxr-xr-xutil/vnet_run8
-rwxr-xr-xvhostbin3179281 -> 3181890 bytes
-rwxr-xr-xvrouterbin3146420 -> 3164418 bytes
10 files changed, 21 insertions, 4 deletions
diff --git a/linear-r1h2/binaries.example.json b/linear-r1h2/binaries.example.json
new file mode 100644
index 0000000..1888a6b
--- /dev/null
+++ b/linear-r1h2/binaries.example.json
@@ -0,0 +1,11 @@
+{
+ "h1": {
+ "binary_path": "./vhost"
+ },
+ "h2": {
+ "binary_path": "./vhost"
+ },
+ "r1": {
+ "binary_path": "./vrouter"
+ }
+} \ No newline at end of file
diff --git a/linear-r1h2/nodes.json b/linear-r1h2/nodes.json
new file mode 100644
index 0000000..6accf5f
--- /dev/null
+++ b/linear-r1h2/nodes.json
@@ -0,0 +1,5 @@
+{
+ "h1": "host",
+ "h2": "host",
+ "r1": "router"
+} \ No newline at end of file
diff --git a/reference/arm64/vhost b/reference/arm64/vhost
index 2b58633..05bbd9c 100755
--- a/reference/arm64/vhost
+++ b/reference/arm64/vhost
Binary files differ
diff --git a/reference/arm64/vrouter b/reference/arm64/vrouter
index e8daf6b..94290b0 100755
--- a/reference/arm64/vrouter
+++ b/reference/arm64/vrouter
Binary files differ
diff --git a/reference/vhost b/reference/vhost
index 4f643fd..3a0c9cf 100755
--- a/reference/vhost
+++ b/reference/vhost
Binary files differ
diff --git a/reference/vrouter b/reference/vrouter
index eda94a0..9444ed5 100755
--- a/reference/vrouter
+++ b/reference/vrouter
Binary files differ
diff --git a/util/vnet_generate b/util/vnet_generate
index 8cfb417..01f7163 100755
--- a/util/vnet_generate
+++ b/util/vnet_generate
@@ -190,6 +190,7 @@ class Node():
print(f"Warning: multiple routers found for host {self.name}, selecting one")
default_router, default_iface = routers[0]
default_ip, _ = default_router.get_ip_on_network(default_iface.network)
+ fd.write("routing static\n\n")
fd.write("# Default route\n")
fd.write("route 0.0.0.0/0 via {}\n".format(default_ip))
else:
diff --git a/util/vnet_run b/util/vnet_run
index 39d72a6..628ba62 100755
--- a/util/vnet_run
+++ b/util/vnet_run
@@ -165,15 +165,15 @@ def main(input_args):
if args.bin_config:
bin_info = BinManager.from_bin_config(args.bin_config)
else:
- if args.bin_dir:
- host_bin = pathlib.Path(args.bin_dir).resolve() / VHOST_BINARY_NAME
- router_bin = pathlib.Path(args.bin_dir).resolve() / VROUTER_BINARY_NAME
- else:
+ if (args.router != "") or (args.host != ""):
if args.router == "" or args.host == "":
do_exit("Must specify host and router binaries with --bin-dir or (--host and --router)")
router_bin = pathlib.Path(args.router).resolve()
host_bin = pathlib.Path(args.host).resolve()
+ else:
+ host_bin = pathlib.Path(args.bin_dir).resolve() / VHOST_BINARY_NAME
+ router_bin = pathlib.Path(args.bin_dir).resolve() / VROUTER_BINARY_NAME
check_bin_exists(router_bin)
check_bin_exists(host_bin)
diff --git a/vhost b/vhost
index 2397f1e..1ddd11e 100755
--- a/vhost
+++ b/vhost
Binary files differ
diff --git a/vrouter b/vrouter
index f347322..6ebcda2 100755
--- a/vrouter
+++ b/vrouter
Binary files differ