mirror of
https://github.com/mirage/qubes-mirage-firewall.git
synced 2025-04-25 01:19:18 -04:00
try to make the packet type difference a bit clearer
This commit is contained in:
parent
ad48a0f78a
commit
0d54f80b6b
@ -89,9 +89,9 @@ let nat_to t ~host ~port packet =
|
||||
|
||||
(* Handle incoming packets *)
|
||||
|
||||
let apply_rules t (rules : ('a, 'b) Packet.t -> Packet.action) ~dst (firewall_packet : ('a, 'b) Packet.t) : unit Lwt.t =
|
||||
let packet = to_mirage_nat_packet firewall_packet in
|
||||
match rules firewall_packet, dst with
|
||||
let apply_rules t (rules : ('a, 'b) Packet.t -> Packet.action) ~dst (annotated_packet : ('a, 'b) Packet.t) : unit Lwt.t =
|
||||
let packet = to_mirage_nat_packet annotated_packet in
|
||||
match rules annotated_packet, dst with
|
||||
| `Accept, `Client client_link -> transmit_ipv4 packet client_link
|
||||
| `Accept, (`External _ | `NetVM) -> transmit_ipv4 packet t.Router.uplink
|
||||
| `Accept, (`Firewall_uplink | `Client_gateway) ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user