Use released mirage-nat 1.0

This commit is contained in:
Thomas Leonard 2017-10-15 14:35:03 +01:00
parent 42fcbdf1ad
commit 997d538a93
4 changed files with 8 additions and 9 deletions

View File

@ -20,4 +20,4 @@ addons:
- time - time
- libxen-dev - libxen-dev
env: env:
- OCAML_VERSION=4.04 MIRAGE_BACKEND=xen PINS="mirage-nat:https://github.com/talex5/mirage-nat.git#lru" - OCAML_VERSION=4.04 MIRAGE_BACKEND=xen

View File

@ -1,17 +1,16 @@
# Pin the base image to a specific hash for maximum reproducibility. # Pin the base image to a specific hash for maximum reproducibility.
# It will probably still work on newer images, though, unless Debian 8 # It will probably still work on newer images, though, unless Debian 8
# changes some compiler optimisations (unlikely). # changes some compiler optimisations (unlikely).
#FROM ocaml/opam:debian-8_ocaml-4.03.0 #FROM ocaml/opam:debian-8_ocaml-4.04.2
FROM ocaml/opam@sha256:66f9d402ab6dc00c47d2ee3195ab247f9c1c8e7e774197f4fa6ea2a290a3ebbc FROM ocaml/opam@sha256:17a527319b850bdaf6759386a566dd088a053758b6d0603712dbcb10ad62f86c
# Pin last known-good version for reproducible builds. # Pin last known-good version for reproducible builds.
# Remove this line (and the base image pin above) if you want to test with the # Remove this line (and the base image pin above) if you want to test with the
# latest versions. # latest versions.
RUN cd opam-repository && git reset --hard a51e30ffcec63836014a5bd2408203ec02e4c7af && opam update RUN cd opam-repository && git fetch origin && git reset --hard ad6348231fa14e1d9df724db908a1b7fe07d3ab9 && opam update
RUN sudo apt-get install -y m4 libxen-dev RUN sudo apt-get install -y m4 libxen-dev
RUN opam install -y vchan xen-gnt mirage-xen-ocaml mirage-xen-minios io-page mirage-xen mirage RUN opam install -y vchan xen-gnt mirage-xen-ocaml mirage-xen-minios io-page mirage-xen mirage mirage-nat
RUN opam pin add -n -y mirage-nat 'https://github.com/talex5/mirage-nat.git#lru'
RUN mkdir /home/opam/qubes-mirage-firewall RUN mkdir /home/opam/qubes-mirage-firewall
ADD config.ml /home/opam/qubes-mirage-firewall/config.ml ADD config.ml /home/opam/qubes-mirage-firewall/config.ml
WORKDIR /home/opam/qubes-mirage-firewall WORKDIR /home/opam/qubes-mirage-firewall

View File

@ -20,10 +20,10 @@ let main =
~packages:[ ~packages:[
package "vchan"; package "vchan";
package "cstruct"; package "cstruct";
package "tcpip" ~sublibs:["stack-direct"; "xen"] ~min:"3.1.0"; package "tcpip" ~sublibs:["stack-direct"; "xen"; "arpv4"] ~min:"3.1.0";
package "mirage-net-xen"; package "mirage-net-xen";
package "mirage-qubes"; package "mirage-qubes";
package "mirage-nat" ~sublibs:["hashtable"]; package "mirage-nat";
package "mirage-logs"; package "mirage-logs";
] ]
"Unikernel.Main" (mclock @-> job) "Unikernel.Main" (mclock @-> job)

View File

@ -11,7 +11,7 @@ type action = [
| `Redirect of Mirage_nat.endpoint | `Redirect of Mirage_nat.endpoint
] ]
module Nat = Mirage_nat_hashtable module Nat = Mirage_nat_lru
type t = { type t = {
table : Nat.t; table : Nat.t;