All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Poirier <benjamin.poirier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: discrepancy in ip(7) wrt. IP DF flag for UDP sockets
Date: Mon, 19 Sep 2011 08:19:40 -0400	[thread overview]
Message-ID: <20110919121940.GA19942@synalogic.ca> (raw)

Hi,

I noticed what appears to be a discrepancy between the ip(7) man page
and the kernel code with regards to the IP DF flag for UDP sockets.

The man page says that "The don't-fragment flag is set on all outgoing
datagrams" and that the ip_no_pmtu_disc sysctl affects only SOCK_STREAM
sockets. This is quickly disproved by doing:
echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc
firing up netcat and looking at a few outgoing udp packets in wireshark
(they don't have the DF flag set).

1) in the words of `man 7 ip`:
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 this socket.  The don't-fragment flag is set  on
      all  outgoing datagrams.  The system-wide default is controlled
      by the /proc/sys/net/ipv4/ip_no_pmtu_disc file for  SOCK_STREAM
      sockets, and disabled on all others.

This is the text present in the latest version of the online manpages,
http://webcache.googleusercontent.com/search?q=cache:http://www.kernel.org/doc/man-pages/reporting_bugs.html&ie=UTF-8

2) in net/ipv4/af_inet.c:inet_create():
	if (ipv4_config.no_pmtu_disc)
		inet->pmtudisc = IP_PMTUDISC_DONT;
	else
		inet->pmtudisc = IP_PMTUDISC_WANT;

and pmtudisc is left alone from there on for UDP sockets.

What should be adjusted, the man page or the code?

Thanks,
-Ben
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2011-09-19 12:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19 12:19 Benjamin Poirier [this message]
     [not found] ` <20110919121940.GA19942-k/PPzeaMb74v2OKnPYDugg@public.gmane.org>
2011-09-19 13:03   ` discrepancy in ip(7) wrt. IP DF flag for UDP sockets Neil Horman
     [not found]     ` <20110919130313.GA27819-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2011-09-20  6:14       ` Michael Kerrisk
     [not found]         ` <CAKgNAkgWRdkxgTXNnMi4PVGGsOd-8EHF1siBrk-Bj=rnYenVmQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-20 13:29           ` Benjamin Poirier
     [not found]             ` <20110920132954.GA23041-k/PPzeaMb74v2OKnPYDugg@public.gmane.org>
2011-09-20 13:38               ` Neil Horman
     [not found]                 ` <20110920133837.GA16323-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2011-09-20 14:12                   ` Benjamin Poirier
     [not found]                     ` <20110920141234.GA23164-k/PPzeaMb74v2OKnPYDugg@public.gmane.org>
2011-09-20 14:31                       ` Neil Horman
     [not found]                         ` <20110920143109.GB16323-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2011-09-22  4:15                           ` Michael Kerrisk
     [not found]                             ` <CAKgNAkiSrGdXd2e1dpcC0fPmARRwkMrUvB8vCJ7eQ8SYsCuuUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-22 10:48                               ` Neil Horman
2011-09-22 12:44                               ` Benjamin Poirier
2011-09-23  5:27                                 ` Michael Kerrisk

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=20110919121940.GA19942@synalogic.ca \
    --to=benjamin.poirier-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.