Skip to content

Commit

Permalink
Merge pull request #79 from hannesm/ipaddr3
Browse files Browse the repository at this point in the history
Ipaddr3 support
  • Loading branch information
hannesm authored Jan 5, 2019
2 parents a878d93 + 4b2bcd5 commit 0adefca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/xenstore.ml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ module Make(Xs: Xs_client_lwt.S) = struct
Xs.(immediate xsc (fun h -> read h (frontend / "mac")))
>|= Macaddr.of_string
>>= function
| Some x -> return x
| None ->
| Ok x -> return x
| Error (`Msg msg) ->
let m = Macaddr.make_local (fun _ -> Random.int 255) in
Log.info (fun f -> f "%s: no configured MAC, using %s"
(Sexplib.Sexp.to_string (S.sexp_of_id id)) (Macaddr.to_string m));
Log.info (fun f -> f "%s: no configured MAC (error: %s), using %a"
(Sexplib.Sexp.to_string (S.sexp_of_id id)) msg Macaddr.pp m);
return m

let read_features side path =
Expand Down

0 comments on commit 0adefca

Please sign in to comment.