Skip to content

Commit 13fb1c5

Browse files
keigoijoanbm
andcommitted
Make EAI_NODATA a successful result (see #509 and moby/moby#47628)
Co-authored-by: Joan Bruguera Micó <[email protected]>
1 parent 5ae554c commit 13fb1c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/hostnet/host.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,10 @@ module Dns = struct
12671267
let getaddrinfo node family =
12681268
Luv_lwt.in_luv (fun return ->
12691269
Luv.DNS.getaddrinfo ~family ~node () (function
1270+
| Error `EAI_NODATA ->
1271+
(* Special handling for EAI_NODATA: Treat as success (host exists, but no address data) and
1272+
Return an empty list. See https://github.com/moby/moby/issues/47628 for more context. *)
1273+
return (Ok [])
12701274
| Error err -> return (Error (`Msg (Luv.Error.strerror err)))
12711275
| Ok x ->
12721276
let ips =

0 commit comments

Comments
 (0)