Browse code

added TODOs for open IPv6 point

Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>

Benjamin Böhmke authored on 2020/07/23 23:52:40
Showing 6 changed files
... ...
@@ -34,6 +34,7 @@ func (n *bridgeNetwork) allocatePorts(ep *bridgeEndpoint, reqDefBindIP net.IP, u
34 34
 
35 35
 	// IPv6 port binding excluding user land proxy
36 36
 	if n.driver.config.EnableIP6Tables && ep.addrv6 != nil {
37
+		// TODO IPv6 custom default binding IP
37 38
 		pbv6, err := n.allocatePortsInternal(ep.extConnConfig.PortBindings, ep.addrv6.IP, defaultBindingIPV6, false)
38 39
 		if err != nil {
39 40
 			// ensure we clear the previous allocated IPv4 ports
... ...
@@ -210,6 +210,7 @@ func programMangle(vni uint32, add bool) (err error) {
210 210
 		action = "install"
211 211
 	)
212 212
 
213
+	// TODO IPv6 support
213 214
 	iptable := iptables.GetIptable(iptables.IPv4)
214 215
 
215 216
 	if add == iptable.Exists(iptables.Mangle, chain, rule...) {
... ...
@@ -241,6 +242,7 @@ func programInput(vni uint32, add bool) (err error) {
241 241
 		msg        = "add"
242 242
 	)
243 243
 
244
+	// TODO IPv6 support
244 245
 	iptable := iptables.GetIptable(iptables.IPv4)
245 246
 
246 247
 	if !add {
... ...
@@ -20,6 +20,7 @@ func filterWait() func() {
20 20
 }
21 21
 
22 22
 func chainExists(cname string) bool {
23
+	// TODO IPv6 support
23 24
 	iptable := iptables.GetIptable(iptables.IPv4)
24 25
 	if _, err := iptable.Raw("-L", cname); err != nil {
25 26
 		return false
... ...
@@ -29,6 +30,7 @@ func chainExists(cname string) bool {
29 29
 }
30 30
 
31 31
 func setupGlobalChain() {
32
+	// TODO IPv6 support
32 33
 	iptable := iptables.GetIptable(iptables.IPv4)
33 34
 	// Because of an ungraceful shutdown, chain could already be present
34 35
 	if !chainExists(globalChain) {
... ...
@@ -46,6 +48,7 @@ func setupGlobalChain() {
46 46
 }
47 47
 
48 48
 func setNetworkChain(cname string, remove bool) error {
49
+	// TODO IPv6 support
49 50
 	iptable := iptables.GetIptable(iptables.IPv4)
50 51
 	// Initialize the onetime global overlay chain
51 52
 	filterOnce.Do(setupGlobalChain)
... ...
@@ -95,6 +98,7 @@ func setFilters(cname, brName string, remove bool) error {
95 95
 	if remove {
96 96
 		opt = "-D"
97 97
 	}
98
+	// TODO IPv6 support
98 99
 	iptable := iptables.GetIptable(iptables.IPv4)
99 100
 
100 101
 	// Every time we set filters for a new subnet make sure to move the global overlay hook to the top of the both the OUTPUT and forward chains
... ...
@@ -26,6 +26,7 @@ func arrangeUserFilterRule() {
26 26
 	if ctrl == nil || !ctrl.iptablesEnabled() {
27 27
 		return
28 28
 	}
29
+	// TODO IPv6 support
29 30
 	iptable := iptables.GetIptable(iptables.IPv4)
30 31
 	_, err := iptable.NewChain(userChain, iptables.Filter, false)
31 32
 	if err != nil {
... ...
@@ -57,6 +57,7 @@ func reexecSetupResolver() {
57 57
 		os.Exit(3)
58 58
 	}
59 59
 
60
+	// TODO IPv6 support
60 61
 	iptable := iptables.GetIptable(iptables.IPv4)
61 62
 
62 63
 	// insert outputChain and postroutingchain
... ...
@@ -302,7 +302,7 @@ func filterPortConfigs(ingressPorts []*PortConfig, isDelete bool) []*PortConfig
302 302
 }
303 303
 
304 304
 func programIngress(gwIP net.IP, ingressPorts []*PortConfig, isDelete bool) error {
305
-
305
+	// TODO IPv6 support
306 306
 	iptable := iptables.GetIptable(iptables.IPv4)
307 307
 
308 308
 	addDelOpt := "-I"
... ...
@@ -464,6 +464,7 @@ func programIngress(gwIP net.IP, ingressPorts []*PortConfig, isDelete bool) erro
464 464
 // This chain has the rules to allow access to the published ports for swarm tasks
465 465
 // from local bridge networks and docker_gwbridge (ie:taks on other swarm networks)
466 466
 func arrangeIngressFilterRule() {
467
+	// TODO IPv6 support
467 468
 	iptable := iptables.GetIptable(iptables.IPv4)
468 469
 	if iptable.ExistChain(ingressChain, iptables.Filter) {
469 470
 		if iptable.Exists(iptables.Filter, "FORWARD", "-j", ingressChain) {
... ...
@@ -610,6 +611,7 @@ func invokeFWMarker(path string, vip net.IP, fwMark uint32, ingressPorts []*Port
610 610
 
611 611
 // Firewall marker reexec function.
612 612
 func fwMarker() {
613
+	// TODO IPv6 support
613 614
 	iptable := iptables.GetIptable(iptables.IPv4)
614 615
 	runtime.LockOSThread()
615 616
 	defer runtime.UnlockOSThread()
... ...
@@ -716,6 +718,7 @@ func addRedirectRules(path string, eIP *net.IPNet, ingressPorts []*PortConfig) e
716 716
 
717 717
 // Redirector reexec function.
718 718
 func redirector() {
719
+	// TODO IPv6 support
719 720
 	iptable := iptables.GetIptable(iptables.IPv4)
720 721
 	runtime.LockOSThread()
721 722
 	defer runtime.UnlockOSThread()