Skip to content

Commit

Permalink
Merge pull request #389 from hannesm/ipaddr3
Browse files Browse the repository at this point in the history
fix unikernel for ipaddr >= 2.9.0 compat
  • Loading branch information
hannesm authored Jan 14, 2019
2 parents 64cb1d6 + 42d17fb commit f187547
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/unikernel/config.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
open Mirage

let main = foreign "Services.Main" (stackv4 @-> job)
let main =
let packages = [ package ~min:"2.9.0" "ipaddr" ] in
foreign ~packages "Services.Main" (stackv4 @-> job)

let stack = generic_stackv4 default_network

Expand Down
2 changes: 1 addition & 1 deletion examples/unikernel/services.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Main (S: Mirage_types_lwt.STACKV4) = struct
let ip, port = S.TCPV4.dst flow in
Logs.warn
(fun m -> m "closing connection from %a:%d due to error %a while %s"
Ipaddr.V4.pp_hum ip port pp e message);
Ipaddr.V4.pp ip port pp e message);
S.TCPV4.close flow

let rec chargen flow how_many start_at =
Expand Down

0 comments on commit f187547

Please sign in to comment.