Commit graph

2601 commits

Author SHA1 Message Date
Brian Goff
a0a473125b Fix libnetwork imports
After moving libnetwork to this repo, we need to update all the import
paths for libnetwork to point to docker/docker/libnetwork instead of
docker/libnetwork.
This change implements that.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 21:51:23 +00:00
Sebastiaan van Stijn
c1437c2f42 Merge pull request #2635 from AkihiroSuda/ipv6disable
fix port forwarding with ipv6.disable=1
2021-05-25 11:06:46 +02:00
Sebastiaan van Stijn
719504b810 vendor: github.com/ishidawataru/sctp f2269e66cdee387bd321445d5d300893449805be
full diff: 6e2cb13661...f2269e66cd

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-19 14:11:08 +02:00
Akihiro Suda
325668315c fix port forwarding with ipv6.disable=1
Make `docker run -p 80:80` functional again on environments with kernel boot parameter `ipv6.disable=1`.

Fix moby/moby issue 42288

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-27 15:46:07 +09:00
Francesco Degrassi
f41a6d5c95 enforce order of lock acquisitions on network/controller, fixes #2632
Signed-off-by: Francesco Degrassi <francesco.degrassi@optionfactory.net>
2021-04-21 15:51:31 +02:00
Arko Dasgupta
5d3b0102f7 Use hostIP to decide on Portmapper version
Use HostIP to decide which portmapper object to store the binding
in consistently in the allocate and release method (b506539e9c/drivers/bridge/port_mapping.go (L208))

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2021-01-23 12:00:46 -08:00
Arko Dasgupta
b506539e9c Merge pull request #2608 from arkodg/allow-ipv6-ipv4-userland-proxy
Fix regression in docker-proxy
2021-01-19 09:48:41 -08:00
Arko Dasgupta
4f9af99194 Fix regression in docker-proxy
Allow proxying IPv6 traffic to the container's IPv4 interface
if `--ipv6` is disabled and the container does not have a
IPv6 address, when the docker-proxy / `userland-proxy` is enabled
on `dockerd`

Relates to https://github.com/moby/libnetwork/issues/2607

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2021-01-14 17:51:09 -08:00
Benjamin Böhmke
a6d7b43dfc fixed IPv6 iptables rules for enabled firewalld
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2021-01-07 17:46:32 +01:00
Arko Dasgupta
33a82a26a8 Fix IPv6 Port Forwarding for the Bridge Driver
1. Allocate either a IPv4 and/or IPv6 Port Binding (HostIP, HostPort, ContainerIP,
ContainerPort) based on the input and system parameters
2. Update the userland proxy as well as dummy proxy (inside port mapper) to
specifically listen on either the IPv4 or IPv6 network

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2020-12-14 18:46:22 -08:00
Arko Dasgupta
09be71b900 Merge pull request #2603 from bboehmke/ipv6_portmapper_chain
Fixed IPv6 portmapper iptables chain initialization
2020-12-11 10:39:35 -08:00
Arko Dasgupta
cf05dae77a Merge pull request #2600 from arkodg/fix-ipv6tables-panic
Make sure IPv6 is enabled for IP6tables
2020-12-11 10:20:38 -08:00
Benjamin Böhmke
06308f4d37 setup IPv4 and IPv6 iptables chain
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-12-11 11:12:41 +01:00
Benjamin Böhmke
d14b7a5191 fixed ip6tables command in error message
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-12-11 11:10:55 +01:00
Arko Dasgupta
b7c663c2ec Make sure IPv6 is enabled for IP6tables
Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2020-12-11 00:39:42 -08:00
Benjamin Böhmke
4886e5e5b1 Added improved IP validation for port mapper
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-11-20 23:03:35 +01:00
Sebastiaan van Stijn
5602e9b969 Merge pull request #2550 from fanjiyun/control-network-interface-order-for-containers
reduce parameters for func JoinOptionPriority
2020-10-31 19:02:54 +01:00
Sebastiaan van Stijn
fb9ecec127 Merge pull request #2585 from scottp-dpaw/lbendpoint_fix
service_linux: Fix null dereference in findLBEndpointSandbox
2020-10-31 18:31:17 +01:00
Arko Dasgupta
dc6cbb55b4 Merge pull request #2572 from bboehmke/ipv6_nat
Enable IPv6 NAT (rebase of #2023)
2020-10-29 14:13:58 -07:00
Scott Percival
959dfca7e6 service_linux: Fix null dereference in findLBEndpointSandbox
Signed-off-by: Scott Percival <scottp@lastyard.com>
2020-09-22 15:06:41 +08:00
Tibor Vass
20c88eb92f Merge pull request #2583 from thaJeztah/update_docker_alt
vendor: update docker to 7ca355652f and reduce dependency graph
2020-09-17 13:29:33 -07:00
Tibor Vass
32e231a258 Merge pull request #2560 from thaJeztah/remove_dead_code
types: remove some dead code
2020-09-17 13:22:34 -07:00
Tibor Vass
2d8f0b4f87 Merge pull request #2562 from thaJeztah/replace_pkg_homedir
client/mflag: remove use of docker/docker/pkg/homedir
2020-09-17 13:21:49 -07:00
Tibor Vass
1d903b1089 Merge pull request #2580 from thaJeztah/update_circleci
CircleCI: update to Docker 19.03.12, and enable BuildKit
2020-09-17 13:13:15 -07:00
Sebastiaan van Stijn
e9646aafa4 vendor: docker/docker 7ca355652f
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:57 +02:00
Sebastiaan van Stijn
b3b8f561f7 vendor: github.com/gogo/protobuf v1.3.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:55 +02:00
Sebastiaan van Stijn
77c68a7f6e vendor: golang.org/x/crypto 75b288015ac94e66e3d6715fb68a9b41bf046ec2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:53 +02:00
Sebastiaan van Stijn
d321fc2f61 vendor: golang.org/x/sync cd5d95a43a6e21273425c7ae415d3df9ea832eeb
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:51 +02:00
Sebastiaan van Stijn
b14bf0e66e vendor: golang.org/x/sys ed371f2e16b4b305ee99df548828de367527b76b
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:48 +02:00
Sebastiaan van Stijn
3c90d159f8 vendor: golang.org/x/net ab34263943818b32f575efc978a3d24e80b04bd7
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:45 +02:00
Sebastiaan van Stijn
b95a3f1f23 vendor: github.com/coreos/etcd v3.3.12
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:43 +02:00
Sebastiaan van Stijn
5ce882207d vendor: runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:41 +02:00
Sebastiaan van Stijn
64e852ee65 vendor github.com/Microsoft/hcsshim 9dcb42f100215f8d375b4a9265e5bba009217a85
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:39 +02:00
Sebastiaan van Stijn
0aad792f1d vendor: containerd/cgroups 318312a373405e5e91134d8063d04d59768a1bff
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:37 +02:00
Sebastiaan van Stijn
2fdc3e86b1 vendor: logrus v1.6.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:35 +02:00
Sebastiaan van Stijn
05701c485e vendor: go.etcd.io/bbolt v1.3.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:33 +02:00
Sebastiaan van Stijn
e11c7fe3ab vendor: vishvananda/netns db3c7e526aae966c4ccfa6c8189b693d6ac5d202
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:31 +02:00
Sebastiaan van Stijn
6cbe360e47 vendor: github.com/gorilla/mux v1.8.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:29 +02:00
Sebastiaan van Stijn
e18c7629c3 vendor: docker/go-events e31b211e4f1cd09aa76fe4ac244571fab96ae47f
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:25 +02:00
Sebastiaan van Stijn
3e1e9e878c vendor: gotest.tools v3.0.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:18 +02:00
Sebastiaan van Stijn
5186d9e1b1 vendor: github.com/pkg/errors v0.9.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 02:49:03 +02:00
Sebastiaan van Stijn
dc6e4d8881 replace github.com/docker/docker/locker with github.com/moby/locker
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 02:38:50 +02:00
Sebastiaan van Stijn
6796c2cc9b client/mflag: remove use of docker/docker/pkg/homedir
The homedir package was only used to print default values for
flags that contained paths inside the user's home-directory in
a slightly nicer way (replace `/users/home` with `~`).

Given that this is not critical, we can replace this with golang's
function, which does not depend on libcontainer.

There's still one use of the homedir package in docker/docker/opts,
which is used by the dnet binary (but only requires the homedir
package when running in rootless mode)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 02:38:48 +02:00
Sebastiaan van Stijn
681196c8f2 Remove dependency on github.com/docker/docker/opts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 02:38:39 +02:00
Sebastiaan van Stijn
bf28003c99 Replace use of deprecated functions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 01:49:42 +02:00
Sebastiaan van Stijn
0e8b02bac4 Makefile: enable BuildKit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-11 16:39:51 +02:00
Sebastiaan van Stijn
53688d374e CircleCI: update to Docker 19.03.12
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-11 16:39:34 +02:00
Sebastiaan van Stijn
6dde6cb0b0 drivers/macvlan: skip kernel version check
All distros that are supported by Docker now have at least
kernel version 3.10, so this check should no longer be needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-31 20:45:02 +02:00
Sebastiaan van Stijn
02d313ca15 drivers/bridge: skip kernel version check
All distros that are supported by Docker now have at least
kernel version 3.10, so this check should no longer be needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-31 20:44:51 +02:00
Sebastiaan van Stijn
304bb14ffc vendor.conf: reformat to match spacing in docker/docker
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-31 20:00:11 +02:00
Benjamin Böhmke
34f4706174 added TODOs for open IPv6 point
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-23 16:52:40 +02:00
Benjamin Böhmke
648d891827 reworked allocatePorts
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-22 15:43:02 +02:00
Benjamin Böhmke
9f98bd79d8 reworked comment of IPTable struct
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-22 15:08:22 +02:00
Benjamin Böhmke
1e1408f421 additional EnableIPTables check in isolateNetwork
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-22 15:06:19 +02:00
Benjamin Böhmke
a4fcced708 enabled ipv6 parameter in TestSetupIPForwarding
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-22 15:05:51 +02:00
Benjamin Böhmke
4d1c92c155 resorted EnableIP6Tables in driver configure
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-21 18:50:03 +02:00
Benjamin Böhmke
9bc2f88f04 isolateNetwork for both IP version
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-21 18:14:19 +02:00
Benjamin Böhmke
ccad03a139 split setupIPTables into setupIP4Tables and setupIP6Tables
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-21 18:14:07 +02:00
Benjamin Böhmke
9cf5335269 default DROP policy on firewall reload also for IPv6
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-21 15:24:20 +02:00
Benjamin Böhmke
ec7df93731 replace string.Contains* with net.IP.To4() check
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-21 15:23:33 +02:00
Benjamin Böhmke
3475f006b7 moved some ipv6 config to setupIPForwarding
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-19 16:17:02 +02:00
Benjamin Böhmke
dfd1925ed1 Renamed driver config variable to EnableIP6Tables
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-19 16:17:02 +02:00
Billy Ridgway
8dbb5b5a7d Implement NAT IPv6 to fix the issue https://github.com/moby/moby/issues/25407
Signed-off-by: Billy Ridgway <wrridgwa@us.ibm.com>
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
2020-07-19 16:16:51 +02:00
Sebastiaan van Stijn
570c5f9e76 testing: remove use of docker/docker/errdefs in tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-17 11:08:39 +02:00
Sebastiaan van Stijn
27345e8f8f log error instead if disabling IPv6 router advertisement failed
Previously, failing to disable IPv6 router advertisement prevented the daemon to
start.

An issue was reported by a user that started docker using `systemd-nspawn "machine"`,
which produced an error;

    failed to start daemon: Error initializing network controller:
    Error creating default "bridge" network: libnetwork:
    Unable to disable IPv6 router advertisement:
    open /proc/sys/net/ipv6/conf/docker0/accept_ra: read-only file system

This patch changes the error to a log-message instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-12 19:32:18 +02:00
Sebastiaan van Stijn
9fd12a5e31 client/mflag: remove use of docker/docker/pkg/homedir
The homedir package was only used to print default values for
flags that contained paths inside the user's home-directory in
a slightly nicer way (replace `/users/home` with `~`).

Given that this is not critical, we can replace this with golang's
function, which does not depend on libcontainer.

There's still one use of the homedir package in docker/docker/opts,
which is used by the dnet binary (but only requires the homedir
package when running in rootless mode)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-04 12:48:37 +02:00
Sebastiaan van Stijn
42b87e6a4b types: remove some dead code
These errors were not in use, so we can remove them

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-04 12:07:03 +02:00
Tibor Vass
dc89fc3449 Merge pull request #2558 from thaJeztah/master_router_advertisements
[master] bridge: disable IPv6 router advertisements
2020-06-02 11:02:38 -07:00
Samuel Karp
e65003a722 bridge: disable IPv6 router advertisements
Signed-off-by: Samuel Karp <skarp@amazon.com>
(cherry picked from commit 9489546c44d94d37337191c263879a7ac075a331)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-02 12:06:39 +02:00
Xinfeng Liu
0c8ffda2ab Fix 'failed to get network during CreateEndpoint'
Fix 'failed to get network during CreateEndpoint' during container starting.
Change the error type to `libnetwork.ErrNoSuchNetwork`, so `Start()` in `daemon/cluster/executor/container/controller.go` will recreate the network.

Signed-off-by: Xinfeng Liu <xinfeng.liu@gmail.com>
2020-06-01 17:16:07 +08:00
Arko Dasgupta
fd1765ca9b Merge pull request #2556 from thaJeztah/remove_unused_error
store.getNetworksFromStore() remove unused error return
2020-05-28 20:03:21 -07:00
Sebastiaan van Stijn
07ed00102d store.getNetworksFromStore() remove unused error return
This function always returned `nil`, so we can remove the error
return, and update other functions that were handling errors.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-26 10:39:38 +02:00
Arko Dasgupta
3f0652ac36 Merge pull request #2548 from arkodg/add-intf-firewalld-zone
Add docker interfaces to firewalld docker zone
2020-05-21 11:34:49 -07:00
Sebastiaan van Stijn
efe0ab37a1 Resolver: fix error handling if we didn't receive a response
Commit 2a480d515e updated the DNS library
and updated the error handling.

Due to changes in the library, we now had to check the response itself
to check if the response was truncated (Truncated DNS replies should
be sent to the client so that the client can retry over TCP).

However, 1e02aae252 added an incorrect
`nil` check to fix a panic, which ignored situations where
an error was returned, but no response (for example, if we failed
to connect to the DNS server).

In that situation, the error would be ignored, and further down we
would consider the connection to have been succesfull, but the DNS
server not returning a result.

After a "successful" lookup (but no results), we break the loop,
and don't attempt lookups in other DNS servers.

Versions before 1e02aae252 would produce:

    Name To resolve: bbc.co.uk.
    [resolver] query bbc.co.uk. (A) from 172.21.0.2:36181, forwarding to udp:192.168.5.1
    [resolver] read from DNS server failed, read udp 172.21.0.2:36181->192.168.5.1:53: i/o timeout
    [resolver] query bbc.co.uk. (A) from 172.21.0.2:38582, forwarding to udp:8.8.8.8
    [resolver] received A record "151.101.0.81" for "bbc.co.uk." from udp:8.8.8.8
    [resolver] received A record "151.101.192.81" for "bbc.co.uk." from udp:8.8.8.8
    [resolver] received A record "151.101.64.81" for "bbc.co.uk." from udp:8.8.8.8
    [resolver] received A record "151.101.128.81" for "bbc.co.uk." from udp:8.8.8.8

Versions after that commit would ignore the error, and stop further lookups:

    Name To resolve: bbc.co.uk.
    [resolver] query bbc.co.uk. (A) from 172.21.0.2:59870, forwarding to udp:192.168.5.1
    [resolver] external DNS udp:192.168.5.1 returned empty response for "bbc.co.uk."

This patch updates the logic to handle the error to log the error (and continue with the next DNS):

 - if an error is returned, and no response was received
 - if an error is returned, but it was not related to a truncated response

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-05-21 17:50:39 +00:00
fanjiyun
a24e5f5fd4 reduce parameters for func JoinOptionPriority
Signed-off-by: fanjiyun <fan.jiyun@zte.com.cn>
2020-05-15 18:29:54 +08:00
Arko Dasgupta
23d1ca4426 Add docker interfaces to firewalld docker zone
If firewalld is running, create a new docker zone and
add the docker interfaces to the docker zone to allow
container networking for distros with firewalld enabled

Fixes: https://github.com/moby/libnetwork/issues/2496

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2020-05-07 18:37:33 -07:00
Sebastiaan van Stijn
c30d55d067 vendor: update moby/ipvs v1.0.1
full diff: https://github.com/moby/ipvs/compare/v1.0.0...v1.0.1

- Fix compatibility issue on older kernels (< 3.18) where the address
  family attribute for destination servers do not exist
- Fix the stats attribute check when parsing destination addresses
- NetlinkSocketsTimeout should be a constant

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-28 17:04:14 +02:00
Arko Dasgupta
7fd076595a Merge pull request #2471 from suwang48404/master
DOCKER-USER chain not created when IPTableEnable=false.
2020-04-09 15:01:08 -07:00
Arko Dasgupta
c7f0b0152e Fix NPE due to null value returned by ep.Iface()
This PR carryforwards https://github.com/moby/libnetwork/pull/2239
and incorporates the suggestions in comments to fix the NPE and
potential NPEs due to a null value returned by ep.Iface()

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2020-04-02 22:34:55 -07:00
Sebastiaan van Stijn
6b3673877c Merge pull request #2538 from wangyumu/add-error-invalid-default-address-pools
Fixes moby/moby#40388, produce an error with invalid address pool
2020-03-31 19:45:25 +02:00
Arko Dasgupta
2e64325fee Merge pull request #2540 from SamWhited/resolver_panic
Fixes a panic in the DNS resolver
2020-03-18 11:26:00 -07:00
Arko Dasgupta
e49ee8266d Merge pull request #2460 from moby/revert-2450-iptables-policy
Revert "Always configure iptables forward policy"
2020-03-18 11:22:47 -07:00
Sam Whited
1e02aae252 Fixes a panic in the DNS resolver
Under certain conditions it appears that the DNS response and returned
error can be nil. When this happens, checking resp.Truncated results in
a nil panic so we must first check that the response is not nil before
checking if a truncated response was received.

See moby/moby#40715

Signed-off-by: Sam Whited <sam@samwhited.com>
2020-03-18 13:59:59 -04:00
Wang Yumu
4dda50d226 Fixes moby/moby#40388
Signed-off-by: Wang Yumu <37442693@qq.com>
2020-03-18 00:09:10 +08:00
Sebastiaan van Stijn
d846c2b1ab vendor: update vishvananda/netlink v1.1.0
full diff: https://github.com/vishvananda/netlink/compare/v1.0.0...v1.1.0

also updated moby/ipvs, which is compatible with this version of netlink,
and update vishvananda/netns to current master (which added go.mod)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:25:54 +01:00
Brian Goff
a533fe7094 Use vendored ipvs package
The ipvs package was moved to a separate repo.

The ipvs package is a fairly generic set of helpers for managing IPVS.
The ipvs package is used by docker swarm and kubernetes.
Because we want to merge libnetwork back into the moby/moby codebase
while also not creating more dependencies for other projects on
moby/moby itself, it was decided that the best path for ipvs is to live
on it's own since there are no other ties to libnetwork.

Ref: https://github.com/moby/libnetwork/issues/2522

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-03-11 12:13:37 -07:00
elangovan sivanandam
c485bbf754 Merge pull request #2523 from arkodg/seperate-internal-empty-parent
Macvlan: Separate empty parent and internal
2020-03-05 15:26:57 -05:00
elangovan sivanandam
a9596db128 Merge pull request #2524 from trapier/cleanup-vfp-during-network-removal
Cleanup VFP during overlay network removal
2020-03-05 14:55:50 -05:00
Arko Dasgupta
76b5905cbe Macvlan: Separate empty parent and internal
https://github.com/docker/libnetwork/pull/2419 and
https://github.com/docker/libnetwork/pull/2407
attempted to seperate out empty parent and internal for
macvlan and ipvlan networks

However it didnt pass the integration tests in moby
https://github.com/moby/moby/pull/40596 and exposed some
more plumbing that needed to be done to make sure
we separate the two things

If the -o parent is empty we create a dummylink
and if internal is set we dont add a default gateway
and make sure north-south communication cannot take place
(only east-west / container-container can)

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2020-03-04 13:24:10 -08:00
Arko Dasgupta
402a6b7dbc Merge pull request #2519 from wangyumu/fix-InhibitIPv4-nil-panic
Fix InhibitIPv4 nil panic
2020-03-04 13:20:06 -08:00
Trapier Marshall
c39ac9c05e Cleanup VFP during overlay network removal
Deleting a network sandbox on Linux implicitly clears OS (ipvs) load
balancer state.  Deleting an HNS network on Windows by contrast does not
inherently remove its corresponding VFP load balancers. The method to
remove load balancers belongs to the network and so must be called prior
to or while deleting a network. This commit reverts one line from
ea2fa20859, reintroducing a call to
explicitly remove backend load balancers during network removal.

Signed-off-by: Trapier Marshall <tmarshall@mirantis.com>
2020-03-03 19:48:38 -05:00
Wang Yumu
41a91e9a5d fix InhibitIPv4 nil panic
Signed-off-by: Wang Yumu <37442693@qq.com>
2020-03-02 23:38:13 +08:00
Akihiro Suda
7ca71f2c49 vendor godbus/dbus v5
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-02-28 18:47:00 +09:00
Sebastiaan van Stijn
add7253d68 Dockerfile: update to Go 1.13.8
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-27 11:46:18 +01:00
Sebastiaan van Stijn
129e28baa3 Fix gofmt in preparation of Go 1.13 update
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-27 11:46:16 +01:00
elangovan sivanandam
c3cf1da916 Merge pull request #2513 from thaJeztah/bump_golang_1.12.17
Dockerfile: update to Golang 1.12.17
2020-02-26 18:06:17 -05:00
elangovan sivanandam
ff09e6c12a Merge pull request #2512 from thaJeztah/debian_buster
Dockerfile: switch to debian "buster", and regenerate protobuf
2020-02-26 15:53:58 -05:00
Arko Dasgupta
68f261bfff Merge pull request #2407 from lemrouch/2406-fix
Macvlan internal network should not change default gateway
2020-02-26 09:28:30 -08:00
Sebastiaan van Stijn
847f469e76 regenerate protobufs with debian buster
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-26 16:03:42 +01:00
Sebastiaan van Stijn
6dc0d4ff60 Dockerfile: update to Golang 1.12.17
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-26 15:42:50 +01:00
Sebastiaan van Stijn
c18a3a075e Dockerfile: switch to debian "buster"
Debian Buster is now the current "stable", and will be the default
baseimage for Golang images going forward.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-26 15:40:11 +01:00
Sam Whited
2a480d515e Bump the DNS library and revendor
Signed-off-by: Sam Whited <sam@samwhited.com>
2020-02-25 15:37:30 -05:00
Sam Whited
9cd3fb6796 Re-vendor with newer vndr
Signed-off-by: Sam Whited <sam@samwhited.com>
2020-02-25 15:37:23 -05:00
Arko Dasgupta
812104ceae Merge pull request #2500 from tklauser/cli-pkg-migrate
Migrate from github.com/codegangsta/cli to github.com/urfave/cli
2020-02-21 15:22:28 -08:00
Pavel Matěja
c7f8bfa001 Fix internal ipvlan network to work in swarm
Using dummy interface allows communication beween containers only if
they are running on the same node in swarm.

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2020-02-20 19:33:48 +00:00
Pavel Matěja
b0bce9159e Fix internal macvlan network to work in swarm
Using dummy interface allows communication beween containers only if
they are running on the same node in swam.

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2020-02-20 19:33:48 +00:00
Pavel Matěja
76bccc5ad4 Ipvlan internal network should not change gw
Since docker container can be connected to combination of several
internal and external networks change of default gateway of the internal
ones breaks communication via the external ones.

This fixes only ipvlan network type

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2020-02-20 17:49:42 +00:00
Arko Dasgupta
14fbe41991 Update design.md
The roadmap document was outdated, and removed in #2316, so remove the link from here

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2020-02-18 17:21:39 -08:00
Arko Dasgupta
a6d52f1521 Merge pull request #2491 from ahjumma/master
Improving load balancer performance
2020-02-16 19:31:14 -08:00
Arko Dasgupta
7bb9876f89 Merge pull request #2498 from wawa0210/bump-hcsshim-v0.8.7
Update vendored dependency hcsshim to v0.8.7
2020-02-16 14:30:42 -08:00
Arko Dasgupta
b8b9d67d1a Merge pull request #2454 from arkodg/add-host-ip-snat
Support for com.docker.network.host_ipv4 driver label
2020-02-15 08:32:56 -08:00
Arko Dasgupta
b5b12d8bec Merge pull request #2317 from gsomlo/gls-bridge-inhibit-ipv4
Allow bridge net driver to skip IPv4 configuration of bridge interface
2020-02-14 14:47:24 -08:00
akim01
9ced389e6e Improving load balancer performance
Further improving load balancer performance by expiring
connections to servers with weights set to 0.

Signed-off-by: Andrew Kim <taeyeonkim90@gmail.com>
2020-02-14 13:24:06 -08:00
Madhu Venugopal
cb48244350 Merge pull request #2494 from thaJeztah/add_arko_to_maintainers
Add Arko to maintainers
2020-02-06 05:29:59 -08:00
Tobias Klauser
5cc6ffae0c Migrate from github.com/codegangsta/cli to github.com/urfave/cli
The library was moved quite a while ago, adjust the module path. No code
changes.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2020-01-24 11:12:07 +01:00
wawa0210
cc7847ddd2 Update vendored dependency hcsshim to v0.8.7
Signed-off-by: wawa0210 <xiaozhang0210@hotmail.com>
2020-01-11 08:08:53 +00:00
elangovan sivanandam
e2c0d868ab Merge pull request #2380 from liskin/bridge-atomic-hwaddr
bridge: Fix hwaddr set race between us and udev
2019-12-31 19:30:42 -05:00
Sebastiaan van Stijn
6492936018 Add Arko to maintainers
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-31 11:04:32 +01:00
Andrew Kim
8899d916c0 Improving load balancer performance
IPVS module used for swarm load balancer had a performance issue
under a high load situation. conn_reuse_mode=0 sysctl variable can
be set to handle the high load situation by reusing existing
connection entries in the IPVS table.

Under a high load, IPVS module was dropping tcp SYN packets whenever
a port reuse is detected with a connection in TIME_WAIT status forcing
clients to re-initiate tcp connections after request timeout events.
By setting conn_reuse_mode=0, IPVS module avoids special handling of
existing entries in the IPVS connection table.
Along with expire_nodest_conn=1, swarm load balancer can handle
a high load of requests and forward connections to newly joining
backend services.

Signed-off-by: Andrew Kim <taeyeonkim90@gmail.com>
2019-12-16 07:16:40 -08:00
Su Wang
c27bb1189d Added document describing libnetwork traffic flow.
Signed-off-by: Su Wang <su.wang@docker.com>
2019-12-05 16:20:57 +00:00
elangovan sivanandam
f55f6f82ed Merge pull request #2445 from kdomanski/ipv6-addr-in-hosts
etchosts: include the container's IPv6 address if available
2019-12-04 13:19:49 -05:00
elangovan sivanandam
9b62a8a675 Merge pull request #2462 from arkodg/fix-key-spi-panic
Fix panic in drivers/overlay/encryption.go
2019-11-15 17:40:09 -05:00
Su Wang
fcb70a0e86 DOCKER-USER chain not created when IPTableEnable=false.
This fix addresses https://docker.atlassian.net/browse/ENGCORE-1115
Expected behaviors upon docker engine restarts:
1. IPTableEnable=true, DOCKER-USER chain present
   -- no change to DOCKER-USER chain
2. IPTableEnable=true, DOCKER-USER chain not present
   -- DOCKER-USER chain created and inserted top of FORWARD
      chain.
3. IPTableEnable=false, DOCKER-USER chain present
   -- no change to DOCKER-USER chain
      the rational is that DOCKER-USER is populated
      and may be used by end-user for purpose other than
      filtering docker container traffic. Thus even if
      IPTableEnable=false, docker engine does not touch
      pre-existing DOCKER-USER chain.
4. IPTableEnable=false, DOCKER-USER chain not present
   -- DOCKER-USER chain is not created.

Signed-off-by: Su Wang <su.wang@docker.com>
2019-11-12 16:32:42 +00:00
Arko Dasgupta
cd864b50a2 Fix panic in drivers/overlay/encryption.go
Issue - "index out of range" panic in drivers/overlay/encryption.go:539
due to a mismatch in indices between curKeys and spis due to
case where updateKeys might bail out due to an error and
not update the spis

Fix - Reconfigure keys when there is a key update failure

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-10-31 12:59:41 -07:00
Sebastiaan van Stijn
fdf46323f4 Update Golang 1.12.12 (CVE-2019-17596)
Golang 1.12.12
-------------------------------

full diff: https://github.com/golang/go/compare/go1.12.11...go1.12.12

go1.12.12 (released 2019/10/17) includes fixes to the go command, runtime,
syscall and net packages. See the Go 1.12.12 milestone on our issue tracker for
details.

https://github.com/golang/go/issues?q=milestone%3AGo1.12.12

Golang 1.12.11 (CVE-2019-17596)
-------------------------------

full diff: https://github.com/golang/go/compare/go1.12.10...go1.12.11

go1.12.11 (released 2019/10/17) includes security fixes to the crypto/dsa
package. See the Go 1.12.11 milestone on our issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.12.11

    [security] Go 1.13.2 and Go 1.12.11 are released

    Hi gophers,

    We have just released Go 1.13.2 and Go 1.12.11 to address a recently reported
    security issue. We recommend that all affected users update to one of these
    releases (if you're not sure which, choose Go 1.13.2).

    Invalid DSA public keys can cause a panic in dsa.Verify. In particular, using
    crypto/x509.Verify on a crafted X.509 certificate chain can lead to a panic,
    even if the certificates don't chain to a trusted root. The chain can be
    delivered via a crypto/tls connection to a client, or to a server that accepts
    and verifies client certificates. net/http clients can be made to crash by an
    HTTPS server, while net/http servers that accept client certificates will
    recover the panic and are unaffected.

    Moreover, an application might crash invoking
    crypto/x509.(*CertificateRequest).CheckSignature on an X.509 certificate
    request, parsing a golang.org/x/crypto/openpgp Entity, or during a
    golang.org/x/crypto/otr conversation. Finally, a golang.org/x/crypto/ssh client
    can panic due to a malformed host key, while a server could panic if either
    PublicKeyCallback accepts a malformed public key, or if IsUserAuthority accepts
    a certificate with a malformed public key.

    The issue is CVE-2019-17596 and Go issue golang.org/issue/34960.

    Thanks to Daniel Mandragona for discovering and reporting this issue. We'd also
    like to thank regilero for a previous disclosure of CVE-2019-16276.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-20 23:38:03 +02:00
elangovan sivanandam
d6689e849b Merge pull request #2461 from suwang48404/master
Allowed libnetwork caller to set ephemeral port
2019-10-14 23:02:04 -04:00
Su Wang
2c4a868f64 Added API to set ephemeral port allocator range.
Also reduce the allowed port range as the total number of containers
per host is typically less than 1K.

This change helps in scenarios where there are other services on
the same host that uses ephemeral ports in iptables manipulation.

The workflow requires changes in docker engine (
https://github.com/moby/moby/pull/40055) and this change. It
works as follows:

1. user can now specified to docker engine an option
   --published-port-range="50000-60000" as cmdline argument or
   in daemon.json.
2. docker engine read and pass this info to libnetwork via
   config.go:OptionDynamicPortRange.
3. libnetwork uses this range to allocate dynamic port henceforth.
4. --published-port-range can be set either via SIGHUP or
   restart docker engine
5. if --published-port-range is not set by user, a OS specific
   default range is used for dynamic port allocation.
   Linux: 49153-60999, Windows: 60000-65000
6 if --published-port-range is invalid, that is, the range
  given is outside of allowed default range, no change takes place.
  libnetwork will continue to use old/existing port range for
  dynamic port allocation.

Signed-off-by: Su Wang <su.wang@docker.com>
2019-10-11 18:48:07 +00:00
Arko Dasgupta
f042605a42 Revert "Merge pull request #2339 from phyber/iptables-check"
This reverts commit 8d76333719, reversing
changes made to bdd0b7bb40.

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-10-11 09:38:19 -07:00
Euan Harris
0ca676db49 Revert "Always configure iptables forward policy"
Reverts 141b53c77a (PR #2450)

Fallout from changing the forwarding default policy to deny was greater than anticipated.

Signed-off-by: Euan Harris <euan.harris@docker.com>
2019-10-07 10:05:07 -07:00
elangovan sivanandam
01f67061b5 Merge pull request #2458 from arkodg/fix-flaky-tests
Fix flaky NetworkDB tests
2019-10-04 16:50:31 -04:00
Arko Dasgupta
34a636bf51 Fix flaky NetworkDB tests
Fixed these tests :

1.TestNetworkDBIslands
Addresses : https://github.com/docker/libnetwork/issues/2402

2.TestNetworkDBCRUDMediumCluster
Addresses : https://github.com/docker/libnetwork/issues/2401

By :

1. Importing gotest.tools/poll to use poll.WaitOn
Above function can be used to check a condition at regular intervals
until a timeout is reached

2. Replacing Sleep with poll.WaitOn

2. Adding closeNetworkDBInstances to close remaining DBs

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-10-04 10:17:19 -07:00
elangovan sivanandam
4540e13414 Merge pull request #2459 from arkodg/fix-error-check
Fix Error Check in NewNetwork
2019-10-03 18:34:21 -04:00
Arko Dasgupta
87b082f365 Fix Error Check in NewNetwork
Use types.MaskableError instead of doing a string comparison

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-10-03 00:54:45 -07:00
elangovan sivanandam
257e0d4d09 Merge pull request #2443 from Rid/shorten-setkey-id
Shorten controller ID in exec-root to not hit UNIX_PATH_MAX
2019-09-28 18:33:13 -04:00
elangovan sivanandam
f7748b11ca Merge pull request #2444 from kdomanski/verbose-ipv6-cannot-add
log the actual error when failing to add IPv6 route
2019-09-28 18:29:39 -04:00
elangovan sivanandam
e481dc9fad Merge pull request #2449 from espensuenson/bugfix_getnetworkfromstore
Fixed getNetworkFromStore, which returned an incorrect struct
2019-09-28 18:27:21 -04:00
elangovan sivanandam
33e9208a19 Merge pull request #2453 from jdrahos/ipvs_weighted_scheduling_constants-2452
weighted scheduling methods constants for ipvs
2019-09-28 18:19:02 -04:00
Su Wang
ff27bb0db4 Resolve "bridge fdb show" hang issue
The output of "bridge fdb show" command invoked under a network
namespace is unpredicable. Sometime it returns empty, and sometime
non-stop rolling output. This perhaps is a bug in kernel
and/or iproute2 implementation. To work around, display fdb  for
 each bridge.

Signed-off-by: Su Wang <su.wang@docker.com>
2019-09-26 21:29:22 +00:00
Jakub Drahos
edd44eede9 trigger new CI run
Signed-off-by: Jakub Drahos <jack.drahos@gmail.com>
2019-09-25 10:39:33 -04:00
Arko Dasgupta
8c8a25d524 Support for com.docker.network.host_ipv4 driver label
This commit allows a user to specify a Host IP via the
com.docker.network.host_ipv4 label which is used as the
Source IP during SNAT for bridge networks .

The use case is for hosts with multiple interfaces and
this label can dictate which IP will be used as Source IP
for North-South traffic

In the absence of this label, MASQUERADE is used which picks the Source IP
based on Next Hop from the Route Table

Addresses: https://github.com/moby/moby/issues/30053

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-09-24 22:15:43 -07:00
Jakub Drahos
0a99a5f152 adding the constants to the test file
Signed-off-by: Jakub Drahos <jack.drahos@gmail.com>
2019-09-24 21:42:32 -04:00
jdrahos
4d1db69bcc weighted scheduling methods constants for ipvs
Signed-off-by: Jakub Drahos <jack.drahos@gmail.com>
2019-09-24 21:01:05 -04:00
Espen Suenson
a1ab732711 return immediately on error
Signed-off-by: Espen Suenson <mail@espensuenson.dk>
2019-09-24 10:58:08 +02:00
Euan Harris
141b53c77a Merge pull request #2450 from TheNodi/iptables-policy
Always configure iptables forward policy
2019-09-17 16:38:09 +01:00
elangovan sivanandam
57fdd1f741 Merge pull request #2429 from pradipd/windows-nosubnet
Updating IPAM config with results from HNS create network call.
2019-09-13 11:19:09 -04:00
Leonardo Nodari
7e584c1d69 Configure iptables forward policy when ip forwarding is enabled
Signed-off-by: Leonardo Nodari <me@leonardonodari.it>
2019-09-12 15:47:27 +02:00
Espen Suenson
43a3151db2 Fixed getNetworkFromStore, which returned incorrect network information - notably, the 'resolver' field was empty.
This fixes https://github.com/moby/moby/issues/38901

Signed-off-by: Espen Suenson <mail@espensuenson.dk>
2019-09-11 21:09:23 +02:00
Kamil Domański
c4fcd7059c etchosts: additionally include the container's IPv6 address if available
Signed-off-by: Kamil Domański <kamil@domanski.co>
2019-09-04 01:58:00 +02:00
Kamil Domański
226fde5cdd etchosts: allow adding multiple container ips
Signed-off-by: Kamil Domański <kamil@domanski.co>
2019-08-30 23:49:33 +02:00
Kamil Domański
27fc6e9bae log the actual error when failing to add IPv6 route
Signed-off-by: Kamil Domański <kamil@domanski.co>
2019-08-30 00:41:24 +02:00
Grant Millar
049966bdc2 Shorten controller ID in exec-root to not hit UNIX_PATH_MAX
Signed-off-by: Grant Millar <rid@cylo.io>
2019-08-28 18:59:49 +01:00
Sebastiaan van Stijn
55adbae783 bump hashicorp/go-sockaddr v1.0.2
full diff: 6d291a969b...v1.0.2

Relevant changes:
  - hashicorp/go-sockaddr#25 Add android os
  - hashicorp/go-sockaddr#28 Add go.mod

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-26 11:59:41 +02:00
Sebastiaan van Stijn
5ee62a9c70 bump hashicorp/go-multierror v1.0.0, add errwrap v1.0.0
full diff: fcdddc395d...v1.0.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-26 11:52:15 +02:00
Pradip Dhara
f366d37c72 Updating IPAM config with results from HNS create network call.
In windows HNS manages IPAM.  If the user does not specify a subnet, HNS will choose one
for them.  However, in order for the IPAM to show up in the output of "docker inspect",
we need to update the network IPAMv4Config field.

Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
2019-08-23 09:58:29 -07:00
Tom Zhao
7ab62b791f Fix parseIP error when parseIP before get AddressFamily
Signed-off-by: Tom Zhao <zlwangel@gmail.com>
2019-08-20 09:32:57 +08:00
Arko Dasgupta
4818e89751 Bump the GO Version to 1.12.8 which contains security fixes
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/golang-announce/65QixT3tcmg/DrFiG6vvCwAJ

Also pin to -stretch

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-08-15 15:40:33 -07:00
Arko Dasgupta
f79533d720 Revert "Apply load balancer properly"
This reverts commit 9f58c475940fb0c0d4b69de0af7787b62a40481f.
This commit is causing TestCreateParallel to be flaky

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-08-15 15:39:46 -07:00
Arko Dasgupta
9a4025d79f Revert "Adjust LockOSThread"
This reverts commit 94af1e5af2.

The reason to revert this is, that TestCreateParallel is
continously failing and breaking the CI

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-08-15 14:44:03 -07:00
elangovan sivanandam
5c9a062864 Merge pull request #2243 from fcrisciani/syscalls
Syscalls reduction
2019-07-31 17:57:15 -04:00
elangovan sivanandam
a79bbdb5f9 Merge pull request #2415 from arkodg/ipvlan-docker-restart-issue
Support dockerd and system restarts for ipvlan and macvlan networks
2019-07-26 13:04:34 -04:00
elangovan sivanandam
0acdd724ae Merge pull request #2420 from thaJeztah/golang_arg
Dockerfile: use GO_VERSION build-arg for overriding Go version
2019-07-25 22:47:14 -04:00
Arko Dasgupta
402efabec5 Remove vlanLinkExists and dummyLinkExists since these are redundant
Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-07-25 16:35:47 -07:00
elangovan sivanandam
50893512b5 Merge pull request #2351 from daym/fewer-modprobes
Use fewer modprobes
2019-07-25 16:18:00 -04:00
Arko Dasgupta
d22824dc11 Move dummyLinkExists into createDummyLink
Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-07-24 17:06:04 -07:00
Sebastiaan van Stijn
5fa03a4a8e Dockerfile: use GO_VERSION build-arg for overriding Go version
This allows overriding the version of Go without making modifications in the
source code, which can be useful to test against multiple versions.

For example:

    make GO_VERSION=1.13beta1 build

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-07-18 11:01:07 +02:00
Pavel Matěja
66a82d7268 Log when endpoint joins internal macvlan network
Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2019-07-16 14:50:08 +02:00
Arko Dasgupta
ddd22a8198 Support dockerd and system restarts for ipvlan and macvlan networks
This commit carries forward the work done in
https://github.com/docker/libnetwork/pull/2295
and fixes two things
1. Allows macvlan and ipvlan to be restored properly
after dockerd or the system is restarted
2. Makes sure the refcount for the configOnly network
is not incremented for the above case so this network
can be deleted after all the associated ConfigFrom networks
are deleted

Addresses: https://github.com/docker/libnetwork/issues/1743

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-07-15 15:37:21 -07:00
elangovan sivanandam
d07c890b48 Merge pull request #2414 from lemrouch/2413-fix
Allow network with --config-from to be --internal
2019-07-15 16:24:19 -04:00
elangovan sivanandam
43b7bc99dc Merge pull request #2411 from lemrouch/2410-fix
Macvlan network handles netlabel.Internal wrong
2019-07-15 12:37:29 -04:00
Pavel Matěja
12a182e937 Ipvlan network handles netlabel.Internal wrong
check value of netlabel.Internal not just it's existence

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2019-07-15 10:15:53 +02:00
Tim Wagner
d132acb485 Fix hardcoded AF_INET for IPv6 address handling
Signed-off-by: Tim Wagner <tim.wagner@freenet.ag>
2019-07-11 08:22:10 +02:00
Pavel Matěja
afcb9fb299 Allow network with --config-from to be --internal
The --internal netlabel is discarded now.

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2019-07-08 15:34:08 +02:00
Tibor Vass
ecc7bd0540 vendor: update netns to 7109fa855
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-06-27 22:26:46 +00:00
Pavel Matěja
e5353649f6 Macvlan network handles netlabel.Internal wrong
check value of netlabel.Internal not just it's existence

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2019-06-27 15:53:57 +02:00
Euan Harris
46bed879da Merge pull request #2231 from msabansal/winnetwork
Add support for Internal and Private network types on windows
2019-06-27 11:23:32 +01:00
Euan Harris
587783fb82 Merge pull request #1656 from huikang/remove-unused-testcode
Removed unused integration test code
2019-06-27 09:57:12 +01:00
Euan Harris
3eeda3d91c Dockerfile: Update to Go 1.12.6, matching moby/moby
Signed-off-by: Euan Harris <euan.harris@docker.com>
2019-06-26 16:54:53 +01:00
Euan Harris
84414583f0 gofmt: Fix formatting warnings
Signed-off-by: Euan Harris <euan.harris@docker.com>
2019-06-26 16:54:31 +01:00
Euan Harris
746e680871 vet: Fix format string warnings
Signed-off-by: Euan Harris <euan.harris@docker.com>
2019-06-26 16:51:22 +01:00
Euan Harris
0275b007c6 vet: Fix composite literal uses unkeyed fields warnings
Signed-off-by: Euan Harris <euan.harris@docker.com>
2019-06-26 16:50:56 +01:00
Pavel Matěja
e2b2318e14 Macvlan internal network shouldln't change gw
Since docker container can be connected to combination of several
internal and external networks change of default gateway of the internal
ones breaks communication via the external ones.

This fixes only macvlan network type

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2019-06-26 14:23:51 +02:00
Tonis Tiigi
75bc82fe5c bridge: add riscv64 build tags
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-26 11:11:15 +08:00
Euan Harris
5c8048b363 Merge pull request #2404 from smarkm/master
Remove roadmap link from README.md
2019-06-25 15:24:14 +01:00
Euan Harris
1e476e7de6 Merge pull request #2365 from thaJeztah/fix_loadIPAMDriver_error_handling
controller.loadIPAMDriver: Unwrap error type returned by PluginGetter
2019-06-25 15:15:45 +01:00
Euan Harris
c3d402cef3 Merge pull request #2403 from thaJeztah/carry_2370_sctp_update
[carry 2370] Update sctp package
2019-06-25 15:11:50 +01:00
Euan Harris
d297a25283 Merge pull request #1723 from sebradloff/patch-1
Change wording for Endpoint description
2019-06-25 15:09:04 +01:00
Euan Harris
c0c586aacb Merge pull request #2279 from mrbeskin/clarify-design-doc
clarifications and typo fixes for the design documentation
2019-06-25 15:07:57 +01:00
Smark
1f1d9898c9 road map loss tracing, just keep use 'Design' describe the 'Future'
Signed-off-by: Smark <smark@freecoop.net>
2019-06-25 22:06:30 +08:00
Sascha Grunert
c5c8653912 Update sctp package
This commit updates the vendored ishidawataru/sctp and adapts its used
types.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-24 17:26:33 +02:00
Sebastiaan van Stijn
1425fd4fcc controller.loadIPAMDriver: Unwrap error type returned by PluginGetter
moby/moby commit b27f70d45 wraps the ErrNotFound error returned when
a plugin cannot be found, to include a backtrace.   This changes the
type of the error, so contoller.loadIPAMDriver no longer converts it
to a libnetwork plugin.NotFoundError.

This is a similar patch as was merged in 9b114971e5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-24 16:40:51 +02:00
Euan Harris
d9ac962114 Merge pull request #2396 from mavenugo/um
Maintainers update
2019-06-24 15:25:30 +01:00
Sebastiaan van Stijn
e9e18d993c bump github.com/vishvananda/netns 13995c7128ccc8e51e9a6bd2b551020a27180abd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-24 14:56:52 +02:00
Sebastiaan van Stijn
d152888722 Bump vishvananda/netlink to 1.0.0
Changes included:

- Allow index specification at link creation time
- replace syscall with golang.org/x/sys/unix
  - related: Use IFF_MULTI_QUEUE from x/sys/unix to define TUNTAP_MULTI_QUEUE
  - related: Use IFLA_* constants from x/sys/unix
- Fix index out of range when no metadata for gretap
- added encapsulation attributes for Iptun and Sittun to support SIT tunnels
- Expose xfrm state's statistics
- Support invert in ip rules
- Support LWTUNNEL_ENCAP_SEG6
- Support setting and retrieving route MTU/AdvMSS
- Fix CalcRtable array parameter bug
- added support for Foo-over-UDP netlink calls
- Support num{tx,rx}queues and udp6zerocsum{tx,rx}
- tuntap: Add multiqueue support
- Retrieve VLAN ID when listing neighbour
- Fix LinkAdd for sit tunnel on 3.10 kernel
- Add support for managing source MACVLANs
- Two functions: one for adding bond slave, one for getting veth peer index
- Eliminate cgo from netlink
- Don't overwrite the XDP file descriptor with flags
- Fix reference to BPF instructions (on Kernel 4.13)
- Add Matchall filter
- Send IFA_CACHEINFO when setting up addresses
- Support IPv6 GRE Tun and Tap
- Add List option to RouteSubscribeWithOptions, AddrSubscribeWithOptions, and LinkSubscribeWithOptions
- Add Fq and Fq_Codel Qdisc support

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-24 14:56:49 +02:00
Euan Harris
97d292bf26 Merge pull request #2361 from thaJeztah/bump_engine
Reformat vendor.conf, update docker/docker and dependencies
2019-06-24 08:47:51 +01:00
Madhu Venugopal
0fce3b3653 Maintainers update
- Add Euan and Elango
- Remove inactive maintainers

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2019-06-21 14:27:00 -07:00
Euan Harris
8d76333719 Merge pull request #2339 from phyber/iptables-check
controller: Check if IPTables is enabled for arrangeUserFilterRule
2019-06-21 17:31:52 +01:00
Arko Dasgupta
313d2b8a74 Make DNS records and queries case-insensitive
RFC434 states that DNS Servers should be case insensitive
    This commit makes sure that all DNS queries will be translated
    to lower ASCII characters and all svcRecords will be saved in
    lower case to abide by the RFC

    Relates to https://github.com/moby/moby/issues/21169

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-06-19 11:23:31 -07:00
Euan Harris
a926e65406 Merge pull request #2364 from thaJeztah/fix_TestValidRemoteDriver
Fix TestValidRemoteDriver GetCapabilities errors
2019-06-14 17:13:23 +01:00
Madhu Venugopal
fc69adf859 Merge pull request #2372 from xinfengliu/improve-support.sh
add checks on node LB in support.sh
2019-06-04 09:22:10 -07:00
Tibor Vass
631ee43f1b Merge pull request #2373 from arkodg/ungraceful-exit-config-from-net-clean
Clean up --config-only networks after --config-from networks have ungracefully exited
2019-06-04 08:46:31 -07:00