Skip to content

Commit fc7caf9

Browse files
committed
Revert "libnet/d/bridge: port mappings: filter by input iface"
This reverts commit 433b1f9. Signed-off-by: Albin Kerouanton <[email protected]>
1 parent 6160aeb commit fc7caf9

12 files changed

Lines changed: 25 additions & 513 deletions

File tree

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ RUN --mount=type=cache,sharing=locked,id=moby-dev-aptlib,target=/var/lib/apt \
542542
libprotobuf-c1 \
543543
libyajl2 \
544544
net-tools \
545-
netcat-openbsd \
546545
patch \
547546
pigz \
548547
sudo \

daemon/info_unix.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"os"
1010
"os/exec"
1111
"path/filepath"
12-
"strconv"
1312
"strings"
1413

1514
runcoptions "github.com/containerd/containerd/api/types/runc/options"
@@ -160,12 +159,6 @@ func (daemon *Daemon) fillPlatformInfo(ctx context.Context, v *system.Info, sysI
160159
if !v.IPv4Forwarding {
161160
v.Warnings = append(v.Warnings, "WARNING: IPv4 forwarding is disabled")
162161
}
163-
if filtering, _ := strconv.ParseBool(os.Getenv("DOCKER_DISABLE_INPUT_IFACE_FILTERING")); filtering {
164-
v.Warnings = append(v.Warnings,
165-
"WARNING: input interface filtering is disabled on port mappings, this might be insecure",
166-
"DEPRECATED: DOCKER_DISABLE_INPUT_IFACE_FILTERING is deprecated and will be removed in a future release",
167-
)
168-
}
169162
return nil
170163
}
171164

integration/internal/network/ops.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ func WithIPv6() func(*network.CreateOptions) {
2727
}
2828
}
2929

30-
// WithIPv6Disabled makes sure IPv6 is disabled on the network.
31-
func WithIPv6Disabled() func(*network.CreateOptions) {
32-
return func(n *network.CreateOptions) {
33-
enable := false
34-
n.EnableIPv6 = &enable
35-
}
36-
}
37-
3830
// WithInternal enables Internal flag on the create network request
3931
func WithInternal() func(*network.CreateOptions) {
4032
return func(n *network.CreateOptions) {

integration/network/bridge/iptablesdoc/generated/usernet-portmap-hostip.md

Lines changed: 0 additions & 147 deletions
This file was deleted.

integration/network/bridge/iptablesdoc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ Scenarios:
4646
- [Container on a routed-mode network, with a published port](generated/usernet-portmap-routed.md)
4747
- [Container on a nat-unprotected network, with a published port](generated/usernet-portmap-natunprot.md)
4848
- [Swarm service, with a published port](generated/swarm-portmap.md)
49-
- [Container on a user-defined network, with a port published on a specific HostIP](generated/usernet-portmap-hostip.md)

integration/network/bridge/iptablesdoc/iptablesdoc_linux_test.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,6 @@ var index = []section{
174174
},
175175
}},
176176
},
177-
{
178-
name: "usernet-portmap-hostip.md",
179-
networks: []networkDesc{{
180-
name: "bridge1",
181-
containers: []ctrDesc{
182-
{
183-
name: "c1",
184-
portMappings: nat.PortMap{"80/tcp": {{HostIP: "127.0.0.1", HostPort: "8080"}}},
185-
},
186-
},
187-
}},
188-
},
189177
}
190178

191179
// iptCmdType is used to look up iptCmds in the markdown (can't use an int
@@ -200,8 +188,6 @@ const (
200188
iptCmdSFilterDocker4 iptCmdType = "SFilterDocker4"
201189
iptCmdLNat4 iptCmdType = "LNat4"
202190
iptCmdSNat4 iptCmdType = "SNat4"
203-
iptCmdLRaw4 iptCmdType = "LRaw4"
204-
iptCmdSRaw4 iptCmdType = "SRaw4"
205191
)
206192

207193
var iptCmds = map[iptCmdType][]string{
@@ -212,8 +198,6 @@ var iptCmds = map[iptCmdType][]string{
212198
iptCmdSFilterDocker4: {"iptables", "-S", "DOCKER"},
213199
iptCmdLNat4: {"iptables", "-nvL", "--line-numbers", "-t", "nat"},
214200
iptCmdSNat4: {"iptables", "-S", "-t", "nat"},
215-
iptCmdLRaw4: {"iptables", "-nvL", "--line-numbers", "-t", "raw"},
216-
iptCmdSRaw4: {"iptables", "-S", "-t", "raw"},
217201
}
218202

219203
func TestBridgeIptablesDoc(t *testing.T) {

integration/network/bridge/iptablesdoc/templates/usernet-portmap-hostip.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)