dotcloud/docker — pull request #2696 by tianon (2013-11-14 11:06:05+00:00)
Title: Enable IPv4/IPv6 forwarding automatically

After some discussion with @shykes, we decided it makes sense to have this enabled in the core, which fixes one of our longest-standing usability issues.

Since `IPv4Forwarding` is officially part of the API, I had to insert this code in "runtime.go" to make sure forwarding is enabled before we check whether it is (which is still important to check, because the kernel could still tell us "no"). This way, if the kernel denies our request for forwarding, we'll still get the warning we have in place now.

Of course, if I'm told where it should have gone to make sure it runs before UpdateCapabilities, I'm more than happy to move it, but after digging around, this seemed like the most appropriate place given the constraints.

If the code addition looks good, I'll go ahead and add a new commit to update the two docs that reference `ip_forward` (Arch and Gentoo install instructions).