1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

20 commits

Author SHA1 Message Date
Alessandro Boch
52da8bda47 modprobe when needed
- in bridge driver modprobe for br_netfilter only if EnableIPTables==true
- move FirewalldInit() to iptables pakcage Init()
- move modprobe for nf_nat and xt_conntrack in iptables.initCheck()

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-03-21 16:35:28 -07:00
Alexander Morozov
a971c561d1 Close dbus connection if firewalld is not started
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-03-09 09:31:22 -08:00
Alessandro Boch
8cf7270d06 Miscellaneous fixes
- Fix npe in sbJoin error path
- Fail again endpoint Join in case of failure
  in programming the external connectivity
- In bridge, look for parent and child container configs
  in the generic data
- iptables.Exists() might be called before any other call to
  iptables.raw(). We need to call checkInit() then.

Introduced by 1638fbdf27

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-03-08 15:49:47 -08:00
Alessandro Boch
2cb645bf57 Fix iptables.Exists logic
- Fixed exists to attempt a raw exists check only when
  "iptables -C ..." execution returns error becasue of "unsupported option"
- Fixed raw exists to not match substring
- Added GetVersion method

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-02-22 11:20:36 -08:00
Alessandro Boch
defcd4afb9 Change in programming iptables in container
- iptables to provide a native API
- resolver.go to invoke the iptables native API
  when programming tables in the container

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-02-05 15:25:43 -08:00
Chun Chen
797c32bcac Clean up docker chain of filter table as well on driver init
Signed-off-by: Chun Chen <ramichen@tencent.com>
2016-01-05 13:02:16 +08:00
Alessandro Boch
95f1bcc249 Change isolation rules for multiple bridge networks
- From subnet to interface

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-23 15:45:27 -08:00
aboch
5c562e2c33 Merge pull request #591 from WeiZhang555/iptables-clean
Cleanup iptables after bridge network is removed
2015-11-25 09:12:10 -08:00
Antonio Murdaca
c1b67065e6 godeps: update coreos/go-systemd to v4 and godbus/dbus to v3
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-20 00:19:47 +01:00
Zhang Wei
e4ce59b7aa Cleanup iptables after bridge network is removed
Fixed #570

Clean unused iptables rules after bridge network is removed

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-11-10 17:53:54 +08:00
David Calavera
cc02894a50 Move test specific functions to a testutils package.
This way we won't vendor test related functions in docker anymore.
It also moves netns related functions to a new ns package to be able to
call the ns init function in tests. I think this also helps with the
overall package isolation.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-07 13:33:28 -04:00
Mohammad Banikazemi
12df37fdd0 Seperates the driver-specific and network-specific iptable operations
for the bridge driver.

Moves two config options, namely EnableIPTables and EnableUserlandProxy
from networks to the driver.

Closes #242
Signed-off-by: Mohammad Banikazemi <MBanikazemi@gmail.com>
2015-08-04 17:26:41 -04:00
Madhu Venugopal
3a8213e40a Fixed the tests.
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-16 10:46:51 -07:00
Arnaud Porterie
9e7d2fe74e Fix duplicated iptables rules
The `iptables.Exists` function is wrong in two ways:
1. The iptables -C call doesn't add `-j DOCKER` and fails to match
2. The long path takes ordering into account in comparison and fails to match

This patch fixes issue 1 by including `-j DOCKER` in the check.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-06-16 10:46:47 -07:00
Madhu Venugopal
903fcbd154 enable hairpin mode on the bridge port & fix iptables rule
* When userland-proxy is disabled, enable hairpin mode on the host-side of the veth
* When userland-proxy is enabled, fix the iptable rules appropriately

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-11 19:23:02 -07:00
Alessandro Boch
c70cfcb150 Provide interface to categorize errors
- Package types to define the interfaces libnetwork errors
  may implement, so that caller can categorize them.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-20 22:29:29 -07:00
Madhu Venugopal
56375f3687 Porting https://github.com/docker/docker/pull/12437
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-19 15:28:48 -07:00
Alessandro Boch
1589c43f9d Restore anonymus import in iptables_test.go
- Which is needed when running make (test in container)

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-18 21:56:36 -07:00
Alessandro Boch
902e8746d3 Optional Userland Proxy
- Port https://github.com/docker/docker/pull/12165 to libnetwork
- More tests will be added later

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-18 18:13:39 -07:00
Alessandro Boch
f16db2c3ad Remove pkg directory
- As recommended by Docker committers.
- Will introduce internal directory when go supports it

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-16 16:12:13 -07:00