lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110922104827.GA4051@hmsreliant.think-freely.org>
Date:	Thu, 22 Sep 2011 06:48:27 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Michael Kerrisk <mtk.manpages@...il.com>
Cc:	Benjamin Poirier <benjamin.poirier@...il.com>,
	linux-man@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: discrepancy in ip(7) wrt. IP DF flag for UDP sockets

On Thu, Sep 22, 2011 at 06:15:53AM +0200, Michael Kerrisk wrote:
> Ben, Neil,
> 
> On Tue, Sep 20, 2011 at 4:31 PM, Neil Horman <nhorman@...driver.com> wrote:
> > On Tue, Sep 20, 2011 at 10:12:34AM -0400, Benjamin Poirier wrote:
> >> On 11-09-20 09:38, Neil Horman wrote:
> >> > On Tue, Sep 20, 2011 at 09:29:54AM -0400, Benjamin Poirier wrote:
> >> > > On 11-09-20 08:14, Michael Kerrisk wrote:
> >> > > > Hello Benjamin, Neil,
> >> > > >
> >> [snip]
> >> > > >
> >> > > > Could you describe the required change in terms of how the man page
> >> > > > text should look--i.e., rewrite the passage as you think it should
> >> > > > look?
> >> > >
> >> > > How about changing it to:
> >> > >   IP_MTU_DISCOVER (since Linux 2.2)
> >> > >   Set or receive the Path MTU Discovery setting for a socket. When
> >> > >   enabled, the don't-fragment flag is set on all outgoing packets.
> >> > >   Linux will perform Path MTU Discovery as defined in RFC 1191 on
> >> > >   SOCK_STREAM sockets. For non-SOCK_STREAM sockets, it is the
> >> > >   user's responsibility to packetize the data in MTU sized chunks
> >> > >   and to do the retransmits if necessary. The kernel will reject
> >> > >   (with EMSGSIZE) datagrams that are bigger than the known path
> >> > >   MTU. The system-wide default is controlled by the
> >> > >   /proc/sys/net/ipv4/ip_no_pmtu_disc file.
> >> > >
> >> > >   Path MTU discovery flags   Meaning
> >> > >   [...]
> >> > >
> >> > > There are some differences between _DO and _WANT that are glossed over
> >> > > in this description, but I suppose there's only so much detail you can
> >> > > put in...
> >> > >
> >> > > Thanks,
> >> > > -Ben
> >> > >
> >> > Yeah, I think thats close, but its only the users responsibility to package
> >> > datagrams in mtu sized chunks if they force the dont fragment bit on.  If they
> >> > go wtih the default, the stack will fragment a datagram is it sees fit according
> >> > to the mtu of the path it traverses
> >>
> >> Exactly. To get into this level of detail, I think we have to mention
> >> the option value, not just enabled/disabled. Let's try like this:
> >>
> >>       IP_MTU_DISCOVER (since Linux 2.2)
> >>       Set or receive the Path MTU Discovery setting for a socket. When
> >>       enabled, Linux will perform Path MTU Discovery as defined in RFC
> >>       1191 on SOCK_STREAM sockets.  For non-SOCK_STREAM sockets,
> >>       IP_PMTUDISC_DO forces the don't-fragment flag to be set on all
> >>       outgoing packets.  It is the user's responsibility to packetize
> >>       the data in MTU sized chunks and to do the retransmits if
> >>       necessary.  The kernel will reject (with EMSGSIZE) datagrams
> >>       that are bigger than the known path MTU.  IP_PMTUDISC_WANT will
> >>       fragment a datagram if needed according to the path MTU or will
> >>       set the don't-fragment flag otherwise.
> >>
> >>       The system-wide default can be toggled between IP_PMTUDISC_WANT
> >>       and IP_PMTUDISC_DONT by writting to the
> >>       /proc/sys/net/ipv4/ip_no_pmtu_disc file.
> >>
> > Yes, that sounds good to me.  Thanks for doing this!
> > Acked-by: Neil Horman <nhorman@...driver.com>
> 
> Ben, thanks for writing this, and Neil, thanks for reviewing it. I've
> applied that change for man-pages-3.34.
> 
> Ben, I added one small piece ti the description of
> /proc/sys/net/ipv4/ip_no_pmtu_disc. For completeness, I've reproduced
> the entire text below. Perhaps you could take a quick scan, to make
> sure that the changed text is consistent with the whole piece.
> 
This looks good to me.  A minor nit in the chunk you added thoguh.  Calling the
MTU discovery value 'flags' suggests they can be or-together, or somehow
otherwise combined, which is non-sensical.  It may be better to use the term
values rather than flags.

Other than that
Acked-by: Neil Horman <nhorman@...driver.com>

Thanks!
Neil

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ