diff options
author | David Doan <daviddoan@Davids-MacBook-Pro-70.local> | 2023-11-08 17:33:32 -0500 |
---|---|---|
committer | David Doan <daviddoan@Davids-MacBook-Pro-70.local> | 2023-11-08 17:33:32 -0500 |
commit | 8345c70da5ca872916b2d524e83bbecbb7e24fae (patch) | |
tree | 258d4b2fa78da5308d787979d47989df778ea441 | |
parent | 421cb40b2b533d24347f3fb07067c5c5a3708fba (diff) | |
parent | a571eee893bc308a75e66f37f908752bb1cbb321 (diff) |
Meerge branch 'main' of https://github.com/brown-cs1680-f23/iptcp-jailpt2
update
-rw-r--r-- | linear-r1h2/binaries.example.json | 11 | ||||
-rw-r--r-- | linear-r1h2/nodes.json | 5 | ||||
-rwxr-xr-x | reference/arm64/vhost | bin | 2421048 -> 2767416 bytes | |||
-rwxr-xr-x | reference/arm64/vrouter | bin | 2421048 -> 2421048 bytes | |||
-rwxr-xr-x | reference/vhost | bin | 2376088 -> 2734744 bytes | |||
-rwxr-xr-x | reference/vrouter | bin | 2400664 -> 2400664 bytes | |||
-rwxr-xr-x | util/vnet_generate | 1 | ||||
-rwxr-xr-x | util/vnet_run | 8 | ||||
-rwxr-xr-x | vhost | bin | 3179281 -> 3181890 bytes | |||
-rwxr-xr-x | vrouter | bin | 3146420 -> 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 Binary files differindex 2b58633..05bbd9c 100755 --- a/reference/arm64/vhost +++ b/reference/arm64/vhost diff --git a/reference/arm64/vrouter b/reference/arm64/vrouter Binary files differindex e8daf6b..94290b0 100755 --- a/reference/arm64/vrouter +++ b/reference/arm64/vrouter diff --git a/reference/vhost b/reference/vhost Binary files differindex 4f643fd..3a0c9cf 100755 --- a/reference/vhost +++ b/reference/vhost diff --git a/reference/vrouter b/reference/vrouter Binary files differindex eda94a0..9444ed5 100755 --- a/reference/vrouter +++ b/reference/vrouter 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) Binary files differBinary files differ |