Skip to content

Commit 333cfa6

Browse files
committed
Fix merge problem
Commit f9c0103 (WSL2 mirrored-mode loopback) uses netlink funcs that were removed/wrapped by commit 00bf437. Signed-off-by: Rob Murray <[email protected]>
1 parent d89eaad commit 333cfa6

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

libnetwork/drivers/bridge/setup_ip_tables_linux.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/docker/docker/internal/nlwrap"
1414
"github.com/docker/docker/libnetwork/iptables"
1515
"github.com/docker/docker/libnetwork/types"
16+
"github.com/vishvananda/netlink"
1617
)
1718

1819
// DockerChain: DOCKER iptable chain name
@@ -569,7 +570,7 @@ func insertMirroredWSL2Rule(config configuration) bool {
569570
if !config.EnableUserlandProxy || config.UserlandProxyPath == "" {
570571
return false
571572
}
572-
if _, err := netlink.LinkByName("loopback0"); err != nil {
573+
if _, err := nlwrap.LinkByName("loopback0"); err != nil {
573574
if !errors.As(err, &netlink.LinkNotFoundError{}) {
574575
log.G(context.TODO()).WithError(err).Warn("Failed to check for WSL interface")
575576
}

libnetwork/drivers/bridge/setup_ip_tables_linux_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/docker/docker/libnetwork/driverapi"
1212
"github.com/docker/docker/libnetwork/iptables"
1313
"github.com/docker/docker/libnetwork/netlabel"
14+
"github.com/vishvananda/netlink"
1415
"gotest.tools/v3/assert"
1516
is "gotest.tools/v3/assert/cmp"
1617
)

0 commit comments

Comments
 (0)