mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
miragesdk: do not die brutally when the calf terminates
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
This commit is contained in:
parent
0f0b721b19
commit
6500becfea
@ -19,7 +19,7 @@ system:
|
||||
command: [/usr/bin/binfmt, -dir, /etc/binfmt.d/, -mount, /binfmt_misc]
|
||||
- name: dhcp-client
|
||||
network_mode: host
|
||||
image: "mobylinux/dhcp-client:da4e4b37ecd11ce411b0b45bde988281c2b35e3a"
|
||||
image: "mobylinux/dhcp-client:aaf811d77ff8d8b2e16ca4dd9d0a2849ef8977b6"
|
||||
capabilities:
|
||||
- CAP_NET_ADMIN # to bring eth0 up
|
||||
- CAP_NET_RAW # to read /dev/eth0
|
||||
|
@ -78,9 +78,7 @@ module Fd = struct
|
||||
let buf = Bytes.create len in
|
||||
let rec loop () =
|
||||
Lwt_unix.read src.fd buf 0 len >>= fun len ->
|
||||
if len = 0 then
|
||||
(* FIXME: why this ever happen *)
|
||||
Fmt.kstrf Lwt.fail_with "FORWARD[%a => %a]: EOF" pp src pp dst
|
||||
if len = 0 then Lwt.return_unit (* EOF *)
|
||||
else (
|
||||
Log.debug (fun l ->
|
||||
l "FORWARD[%a => %a]: %S (%d)"
|
||||
|
Loading…
Reference in New Issue
Block a user