Browse files

tweaks to dns test to work on all backends

  • Loading branch information...
1 parent 1e2292e commit 3f7c9a0b64c8d3edfd8d1a6a8f361db59ae63d13 @avsm committed Sep 22, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 examples/net/dns/server.ml
View
9 examples/net/dns/server.ml
@@ -1,9 +1,10 @@
open Lwt
open Printf
-let ipaddr = Net.Nettypes.ipv4_addr_of_tuple (0l,0l,0l,0l)
-(* let ipaddr = Net.Nettypes.ipv4_addr_of_tuple (10l,0l,0l,2l) *)
-let port = 53
+(* Note: ipaddr is ignored in UNIX socket mode, only used
+ by the direct stack *)
+let ipaddr = Net.Nettypes.ipv4_addr_of_tuple (10l,0l,0l,2l)
+let port = 5555
let main () =
Log.info "Server" "finding static kv_ro block device";
@@ -22,7 +23,7 @@ let main () =
Log.info "Server" "starting server, port %d" port;
Net.Manager.create (fun mgr interface id ->
- let src = (Some ipaddr, port) in
+ let src = None, port in (* listen on all addresses *)
let ip = Net.Nettypes.(
(ipaddr,
ipv4_addr_of_tuple (255l,255l,255l,0l),

0 comments on commit 3f7c9a0

Please sign in to comment.