7 Commits

Author SHA1 Message Date
Sabith Saheb
3e66221169 libnetwork: use math/rand/v2 for DNS address shuffling
Replace the custom seeded RNG and mutex with the top-level rand.Shuffle
from math/rand/v2, which is properly seeded and safe for concurrent use,
and inline the shuffle at its only call site in handleIPQuery.

Signed-off-by: Sabith Saheb <shabi7204192361@gmail.com>
2026-07-08 11:52:58 +05:30
Sebastiaan van Stijn
96597f3098 daemon/libnetwork: Network.ResolveService: slight optimization
- use strings.Cut to avoid strings.Split + strings.Join
- move vars closer to where used

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-05-28 14:49:02 +02:00
Rob Murray
5bb55365c5 forwardExtDNS: Don't cancel context then use it
Introduced by commit 4de8459 ("libnet: add OTEL tracing to the
embedded DNS").

Signed-off-by: Rob Murray <rob.murray@docker.com>
2026-02-05 16:40:38 +00:00
Cory Snider
46ab36ae46 daemon/internal: move netiputil from libnetwork
These utilities are going to be needed elsewhere in the daemon to handle
netip values from API requests.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-10-03 21:39:13 +02:00
Sebastiaan van Stijn
95eeb0b3b0 libnetwork/types: define IPFamily type for IP-family consts
Define a type to help discovery, and update the signatures of
`ResolveName`, `Network.ResolveName`, and `Sandbox.ResolveName`
accordingly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-01 22:32:57 +02:00
Derek McGowan
f74e5d48b3 Create github.com/moby/moby/v2 module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:13:29 -07:00
Derek McGowan
7a720df61f Move libnetwork to daemon/libnetwork
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-14 09:25:23 -07:00