Skip to content

Commit

Permalink
Disconnect the socket before removing it from the filter rules
Browse files Browse the repository at this point in the history
attempts to fix docker/for-mac/issues/#1374
  • Loading branch information
Tyler Lubeck committed Aug 3, 2017
1 parent a06c975 commit a0aa83f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hostnet/mux.ml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@ module Make (Netif: Mirage_net_lwt.S) = struct
let remove t rule =
Log.debug (fun f ->
f "removing switch port for %s" (Ipaddr.V4.to_string rule));
let (_:unit io) = Netif.disconnect t.netif in
t.rules <- RuleMap.remove rule t.rules



let callback t buf =
(* Does the packet match any of our rules? *)
let open Frame in
Expand Down

0 comments on commit a0aa83f

Please sign in to comment.