6 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
4b230a4909 internal/testutils: merge with internal/testutil
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-08 10:08:35 +02:00
Albin Kerouanton
2436458227 libnet/d/bridge: Register: pass a Configuration struct
Libnetwork passes a map[string]any to the bridge driver's Register
function. This forces the daemon to convert its configuration into a
map, and the driver to convert that map back into a struct.

This is unnecessary complexity, and makes it harder to track down where
and how bridge driver configuration fields are set.

Refactor libnetwork to let the daemon register the bridge.Configuration
directly through a new option `OptionBridgeConfig`.

The bridge driver now takes a `Configuration` param that needs no
special treatment.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-03 12:10:10 +02:00
Albin Kerouanton
8839f53175 d/libnet: TestUserChain: fix error matching for nonexistent chains
Debian 13 ships iptables-nft v1.8.11 which returns a different error
than previous versions when doing `iptables -S` for a nonexistent chain.

Older versions:

    ip6tables v1.8.9 (nf_tables): chain `<chain>' in table `filter' is incompatible, use 'nft' tool.

Newer versions:

    ip6tables: No chain/target/match by that name.

Bisecting iptables-nft, this change was introduced by [1] which was
released in v1.8.10.

Pick the expected error message based on iptables-nft version.

[1]: https://git.netfilter.org/iptables/commit/?id=82ccfb488eeac5507471099b9b4e6d136cc06e3b

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-08-28 17:41:49 +02:00
Sebastiaan van Stijn
48557f72f9 daemon/libnetwork: TestUserChain: rename golden files
- Use a subdirectory for all files used in the test
- Add a .golden file-extension for easier discovery of generated files

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-16 15:18:22 +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