netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ezequiel@vanguardiasur.com.ar
Cc: netdev@vger.kernel.org, kernel@kyup.com, kuznet@ms2.inr.ac.ru,
	jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net
Subject: Re: [PATCH] ipv4: Fix non-initialized TTL when CONFIG_SYSCTL=n
Date: Mon, 23 May 2016 14:33:18 -0700 (PDT)	[thread overview]
Message-ID: <20160523.143318.293951661657795088.davem@davemloft.net> (raw)
In-Reply-To: <1463761270-8955-1-git-send-email-ezequiel@vanguardiasur.com.ar>

From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Date: Fri, 20 May 2016 13:21:10 -0300

> 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>

Applied and queued up for -stable, thanks.

      reply	other threads:[~2016-05-23 21:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20 16:21 [PATCH] ipv4: Fix non-initialized TTL when CONFIG_SYSCTL=n Ezequiel Garcia
2016-05-23 21:33 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160523.143318.293951661657795088.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kernel@kyup.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).