Skip to content

Commit a0aa83f

Browse files
author
Tyler Lubeck
committed
Disconnect the socket before removing it from the filter rules
attempts to fix docker/for-mac/issues/#1374
1 parent a06c975 commit a0aa83f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/hostnet/mux.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ module Make (Netif: Mirage_net_lwt.S) = struct
6767
let remove t rule =
6868
Log.debug (fun f ->
6969
f "removing switch port for %s" (Ipaddr.V4.to_string rule));
70+
let (_:unit io) = Netif.disconnect t.netif in
7071
t.rules <- RuleMap.remove rule t.rules
7172

73+
74+
7275
let callback t buf =
7376
(* Does the packet match any of our rules? *)
7477
let open Frame in

0 commit comments

Comments
 (0)