dotcloud/docker — pull request #3801 by tianon (2014-01-28 04:41:30+00:00)
Title: Add --ip-forward flag to daemon (enabled by default)

... which automatically sets "net.ipv4.ip_forward" to 1

See also https://groups.google.com/d/topic/docker-dev/DCjF5Prx7HA/discussion, #2396, and #2696.

I added the code to the place that seemed to make the most sense logically (network.go), but I'm happy to move around as necessary or desired (of course).

Also of note, I included both `-ip-forward` (`"#ip-forward"`) and `--ip-forward` (`"-ip-forward"`) because mflag gave me nil dereference errors with only one version of the flag defined, which seemed strange, but I didn't want to argue with mflag for this PR, and it does feel somewhat right to keep consistent for now. :)