Commit graph

11 commits

Author SHA1 Message Date
Solomon Hykes
3ecd8ff0c8 New package nat: utilities for manipulating the text description of network ports.
This facilitates the refactoring of commands.go

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-11 16:51:01 -08:00
Michael Crosby
167403988d Move network aspect of links into driver as a job
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-31 12:04:44 -08:00
Josh Poimboeuf
5c04f1bcc7 network: remove unnecessary links iptables rule for return traffic
Currently there are two iptables rules per port for each link: one to
allow the parent to connect to the child's port, and another one to
allow return traffic from the child back to the parent.  The second rule
shouldn't be needed because the "ctstate RELATED,ESTABLISHED" rule can
already allow all established traffic.

So this patch does the following:

1. Move the RELATED,ESTABLISHED rule to be _before_ the potential
   inter-container communication DROP rule so it will work for
   inter-container traffic as well.  Since we're inserting, everything
   is reversed chronologically so it should be inserted _after_ we
   insert the DROP.  This also has a small performance benefit because
   it will be processed earlier and it's generally one of the most
   commonly used rules.

2. Get rid of the unnecessary return traffic rule per link.

3. Also move the other "Accept all non-intercontainer outgoing packets"
   rule to earlier.  This gives a small performance benefit since it's
   also a commonly used rule, and it makes sense to logically group it
   next to the ctstate rule.

Docker-DCO-1.1-Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> (github: jpoimboe)
2014-01-24 21:20:34 -06:00
Solomon Hykes
7799ae27ca Move utility package 'iptables' to pkg/iptables 2014-01-06 15:41:24 -08:00
Guillaume J. Charmes
33e70864a2
Refactor State to be 100% thread safe 2013-11-21 16:34:58 -08:00
Guillaume J. Charmes
ff8a4ba0aa
Check the output of iptables command. 2013-11-05 08:33:13 -08:00
Victor Vieux
3362aaa4df fix remove root name and fix error messages 2013-10-30 11:45:11 -07:00
Scott Bessler
1de23f1b81 Expose IP, port, proto as sep. env vars when linking, Closes #2430 2013-10-28 23:02:28 -07:00
Michael Crosby
0d2924408b Add -name for docker run
Remove docker link
Do not add container id as default name
Create an auto generated container name if not
specified at runtime.
2013-10-28 18:09:08 -07:00
Victor Vieux
da864a845b Remove proto frpm default port 2013-10-25 15:13:25 -07:00
Michael Crosby
1cbdaebaa1 Add links for container relationships and introspection 2013-10-25 15:13:24 -07:00