Skip to content

Commit 3555bb4

Browse files
authored
Merge pull request moby#50539 from robmry/iptables_remove_unused_sctp_checksum
iptables: remove deprecated SCTP checksum rule
2 parents a362ae9 + 969b293 commit 3555bb4

File tree

1 file changed

+0
-20
lines changed
  • daemon/libnetwork/drivers/bridge/internal/iptabler

1 file changed

+0
-20
lines changed

daemon/libnetwork/drivers/bridge/internal/iptabler/port.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -140,26 +140,6 @@ func setPerPortForwarding(b types.PortBinding, ipv iptables.IPVersion, bridgeNam
140140
return err
141141
}
142142

143-
// TODO(robmry) - remove, see https://github.com/moby/moby/pull/48149
144-
if b.Proto == types.SCTP && os.Getenv("DOCKER_IPTABLES_SCTP_CHECKSUM") == "1" {
145-
// Linux kernel v4.9 and below enables NETIF_F_SCTP_CRC for veth by
146-
// the following commit.
147-
// This introduces a problem when combined with a physical NIC without
148-
// NETIF_F_SCTP_CRC. As for a workaround, here we add an iptables entry
149-
// to fill the checksum.
150-
//
151-
// https://github.com/torvalds/linux/commit/c80fafbbb59ef9924962f83aac85531039395b18
152-
rule := iptables.Rule{IPVer: ipv, Table: iptables.Mangle, Chain: "POSTROUTING", Args: []string{
153-
"-p", b.Proto.String(),
154-
"--sport", strconv.Itoa(int(b.Port)),
155-
"-j", "CHECKSUM",
156-
"--checksum-fill",
157-
}}
158-
if err := appendOrDelChainRule(rule, "SCTP CHECKSUM", enable); err != nil {
159-
return err
160-
}
161-
}
162-
163143
return nil
164144
}
165145

0 commit comments

Comments
 (0)