Ezequiel Garcia 049bbf589e ipv4: Fix non-initialized TTL when CONFIG_SYSCTL=n
Commit fa50d974d104 ("ipv4: Namespaceify ip_default_ttl sysctl knob")
moves the default TTL assignment, and as side-effect IPv4 TTL now
has a default value only if sysctl support is enabled (CONFIG_SYSCTL=y).

The sysctl_ip_default_ttl is fundamental for IP to work properly,
as it provides the TTL to be used as default. The defautl TTL may be
used in ip_selected_ttl, through the following flow:

  ip_select_ttl
    ip4_dst_hoplimit
      net->ipv4.sysctl_ip_default_ttl

This commit fixes the issue by assigning net->ipv4.sysctl_ip_default_ttl
in net_init_net, called during ipv4's initialization.

Without this commit, a kernel built without sysctl support will send
all IP packets with zero TTL (unless a TTL is explicitly set, e.g.
with setsockopt).

Given a similar issue might appear on the other knobs that were
namespaceify, this commit also moves them.

Fixes: fa50d974d104 ("ipv4: Namespaceify ip_default_ttl sysctl knob")
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-23 14:32:06 -07:00
..
2015-08-25 13:38:50 -07:00
2016-04-27 22:48:24 -04:00
2015-05-28 11:23:20 +08:00
2016-05-20 18:03:16 -04:00
2016-05-12 16:53:58 -04:00
2016-01-05 22:25:57 -05:00
2016-04-27 22:48:24 -04:00
2016-04-27 22:48:23 -04:00
2016-03-31 08:59:56 +02:00
2016-04-21 14:22:13 -04:00
2016-02-17 16:15:46 -05:00
2016-02-17 16:15:46 -05:00
2012-03-11 23:42:51 -07:00
2014-05-23 16:28:53 -04:00
2015-09-17 17:18:37 -07:00
2013-05-31 17:19:05 -07:00