Skip to content

Commit

Permalink
Merge pull request xapi-project#7 from djs55/ipv4-monitor
Browse files Browse the repository at this point in the history
Report IPv4 addresses as well as IPV6 addresses.
  • Loading branch information
djs55 committed Jun 7, 2013
2 parents 41714b7 + 08723e5 commit 747dc66
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions networkd/network_monitor_thread.ml
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,14 @@ let signal_networking_change () =

let ip_watcher () =
let cmd = Network_utils.iproute2 in
(* Only monitor IPv6 addresses at the moment *)
let args = ["-6"; "monitor"; "address"] in
let args = ["monitor"; "address"] in
let readme, writeme = Unix.pipe () in
Mutex.execute watcher_m (fun () ->
watcher_pid := Some (Forkhelpers.safe_close_and_exec ~env:(Unix.environment ()) None (Some writeme) None [] cmd args)
);
Unix.close writeme;
let in_channel = Unix.in_channel_of_descr readme in
debug "Started IPv6 watcher thread";
debug "Started IP watcher thread";
let rec loop () =
let line = input_line in_channel in
(* Do not send events for link-local IPv6 addresses *)
Expand Down

0 comments on commit 747dc66

Please sign in to comment.