mirror of
https://github.com/mirage/qubes-mirage-firewall.git
synced 2024-12-29 00:56:13 -05:00
Removed unreachable Lwt.catch
Spotted by Hannes Mehnert.
This commit is contained in:
parent
ab3508a936
commit
8e714c7712
@ -5,5 +5,5 @@ docker build -t qubes-mirage-firewall .
|
||||
echo Building Firewall...
|
||||
docker run --rm -i -v `pwd`:/home/opam/qubes-mirage-firewall qubes-mirage-firewall
|
||||
echo "SHA2 of build: $(sha256sum qubes_firewall.xen)"
|
||||
echo "SHA2 last known: 6f8f0f19ba62bf5312039f2904ea8696584f8ff49443dec098facf261449ebf2"
|
||||
echo "SHA2 last known: 91c5bf44a85339aaf14e4763a29c2b64537f5bc41cd7dc2571af954ec9dd3cad"
|
||||
echo "(hashes should match for released versions)"
|
||||
|
12
firewall.ml
12
firewall.ml
@ -10,15 +10,13 @@ module Log = (val Logs.src_log src : Logs.LOG)
|
||||
(* Transmission *)
|
||||
|
||||
let transmit_ipv4 packet iface =
|
||||
Lwt.catch
|
||||
(fun () ->
|
||||
Lwt.catch
|
||||
(fun () ->
|
||||
let fragments = ref [] in
|
||||
iface#writev `IPv4 (fun b ->
|
||||
match Nat_packet.into_cstruct packet b with
|
||||
| Error e ->
|
||||
Log.warn (fun f -> f "Failed to write packet to %a: %a"
|
||||
Log.warn (fun f -> f "Failed to NAT packet to %a: %a"
|
||||
Ipaddr.V4.pp iface#other_ip
|
||||
Nat_packet.pp_error e);
|
||||
0
|
||||
@ -33,14 +31,6 @@ let transmit_ipv4 packet iface =
|
||||
(Printexc.to_string ex));
|
||||
Lwt.return_unit
|
||||
)
|
||||
)
|
||||
(fun ex ->
|
||||
Log.err (fun f -> f "Exception in transmit_ipv4: %s for:@.%a"
|
||||
(Printexc.to_string ex)
|
||||
Nat_packet.pp packet
|
||||
);
|
||||
Lwt.return_unit
|
||||
)
|
||||
|
||||
let forward_ipv4 t packet =
|
||||
let `IPv4 (ip, _) = packet in
|
||||
|
Loading…
Reference in New Issue
Block a user