Capitalization in .SS sections across pages (and sometimes even
within a single page) is wildly inconsistent. Make it consistent.
Capitalize first word in heading, but otherwise use lower case,
except where English usage (e.g., proper nouns) or programming
language requirements (e.g., identifier names) dictate otherwise.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Problem:
When connect(2) is executed, the local port number may duplicate.
How reproducible:
When using parameter "net.ipv4.ip_local_port_range", a client may use
the same port to connect to the different sessions on the localhost.
Steps to Reproduce:
1.Change "net.ipv4.ip_local_port_range".
[Example]
net.ipv4.ip_local_port_range = 32768 32770
2.Connect to any two ports of LISTEN by telnet command.
[Example]
# netstat -antp | grep LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2828/smbd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2800/vsftpd
#
# telnet 127.0.0.1 139
# telnet 127.0.0.1 21
# telnet 127.0.0.1 21
3.Duplication of a local transmission port.
[Example]
# netstat -antp
tcp 0 0 127.0.0.1:32769 127.0.0.1:139 ESTABLISHED 18147/telnet
tcp 0 0 127.0.0.1:32769 127.0.0.1:21 ESTABLISHED 18157/telnet
Actual results:
The local port number may duplicate.
Expected results:
The local port number doesn't duplicate.
Additional info:
[Investigation]
"man 7 ip" contains following text:
-----------------------------------------------------------------
When listen(2) or connect(2) are called on an unbound socket, it
is automatically bound to a random free port with the local
address set to INADDR_ANY.
-----------------------------------------------------------------
Although indicated as "it is automatically bound to a random free
port", the port number which is not free like in a reproduce
procedure may be bound. Therefore, based on the description of
this "man 7 ip", it can be judged that it is bug to use the local
port where the process duplicated.
--- Comment by Leitner, Flavio on 2/7/2012 2:55 PM ---
It's allowed to have multiple tasks using the same port (as a
result of calling connect(2)) as long as the other connection
information (4-tuple) differs to resolve the conflict. Thus,
it must be an unique 4-tuple consisting of source and
destination IP addresses and port numbers to not conflict.
In the example, the dest port is different.
tcp 0 0 127.0.0.1:32769 127.0.0.1:139 ESTABLISHED 18147/telnet
tcp 0 0 127.0.0.1:32769 127.0.0.1:21 ESTABLISHED 18157/telnet
Reported-by: Peter Schiffer <pschiffe@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This patch adds documentation of several source-specific multicast
socket options that were added to kernel with implementation
of IGMPv3 in 2.5.68.
The following socket options were added:
IP_ADD_SOURCE_MEMBERSHIP
IP_DROP_SOURCE_MEMBERSHIP
IP_BLOCK_SOURCE
IP_UNBLOCK_SOURCE
IP_MSFILTER
Information Sources:
* RFC 3376 - Internet Group Management Protocol, Version 3
http://tools.ietf.org/html/rfc3376
* RFC 3678 - Socket Interface Extensions for Multicast Source
Filters
http://tools.ietf.org/html/rfc3678
* Kernel source tree
net/ipv4/ip_sockglue.c
net/ipv4/igmp.c
* Test programs used in Linux Network Stack Test
http://git.fedorahosted.org/git/?p=lnst.git
test_tools/multicast/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
In IPv4,IP_MTU is only supported by getsockopt.
In IPv6, we can use IPV6_MTU to set socket's MTU,
but the return value of getsockopt() is the path MTU.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
When SO_SNDTIMEO is set before connect(), then connect()
may return EWOULDBLOCK when the timeout fires.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Notes from Bert Hubert:
Recently PowerDNS needed to support the getting of the
original destination address of packets received on ::.
Following the advice in ipv6(7) generated an error on
setsockopt().
Some googling confirmed that setsockopt() with
IPV6_PKTINFO indeed does not work, but we found that
IPV6_RECVPKTINFO did.
Our experiences are detailed in
http://bert-hubert.blogspot.nl/2012/10/on-binding-datagram-udp-sockets-to-any.html
Please find attached a quite naive patch to ipv6.7 that at
least fixes 'my' problem, but does not document if
IPV6_PKTINFO ever worked as a flag. It does document that
IPV6_RECVPKTINFO is available since 2.6.13.
Please let me know if this patch is acceptable, or if you
want me to dig deeper into the IPV6_PKTINFO situation.
Notes from mtk:
Drop mention of IPV6_PKTINFO; that's IPV6_2292PKTINFO nowadays
(and needs to be documented). And, confusingly, there's nowadays
an IPV6_PKTINFO that is a quite different thig.
With kernel commit 333fad5364d6b457c8d837f7d05802d2aaf8a961
(Sep 2005) PV6_PKTINFO disappeared from the
getsockopt/setsockopt API, and IPV6_2292PKTINFO took its place.
Meanwhile, IPV6_RECVPKTINFO was added.
Then kernel commit b24a2516d10751d7ed5afb58420df25370c9dffb
(Dec 2008) added IPV6_PKTINFO back to the
getsockopt/getsockopt API, but with what looks to be a
rather different meaning (it takes a 'struct in6_pktinfo'
as the third arg).
This seems consistent (if confusing) with the RFCs:
http://www.ietf.org/rfc/rfc2292.txthttp://www.ietf.org/rfc/rfc3542.txt (obsoletes 2292)
Both of those RFCs define an IPV6_PKTINO sockopt, but the
former takes an int arg, and the latter takes a
'struct in6_pktinfo'.
So, my summary of your patch is that it's correct. (But I think
that IPV6_RECVPKTINFO is present since 2.6.14, not 2.6.13.)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The line(s) in the NAME section should only use capitals
where English usage dictates that. Otherwise, use
lowercase throughout.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Existing pages variously use "userspace or "user space".
But, "userspace" is not quite an English word.
So change "userspace" to "user space" or, when used
attributively, "user-space".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
For a better visual result, disable justification and hyphenation
in SEE ALSO where page names are long.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
<groff: iso_8859-2.7>:89: warning: can't find special character `shc'
This is the only "iso_8859-*.7" file that has this (now)
undefined character. The code in column four in "iso_8859-1.7" is
"0x2D" ("HYPHEN, MINUS SIGN" or "HYPHEN-MINUS") instead of "0xAD".
See Debian bug 156154 (or package "manpages").
There should be an explanation for this graphic character and the
code should be 0xAD in iso_8859-1.7 (as in all others), even
though "[gn]roff" does not display a "HYPHEN" in that position of
the table.
The line with "SOFT HYPHEN" gets a footnote and a short
explanation.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The syntax .UR http://example.com paired with .UE will create
links which one can interact, if the pager allows that. One
way to see the effect is ask the man(1) command to use browser
display, e.g.:
man -H man7/uri.7
("\:" is optional groff syntax to permit hyphenless line breaks.)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
uri(7) documents that "Older documents suggested inserting the
prefix 'URL:' just before the URI, but this form has never
caught on." and advise to "enclosed in angle brackets" (and a
few other alternatives).
This patch removes an instance of 'URL:' from the page.
Reported-By: Denis Barbier <bouzim@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
As reported by Herbert Xu, these should not be considered as PIDs.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=383296
Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The man page formerly noted the bash(1) v1 command to do this.
Reported-by: Aaron Peschel <aaron.peschel@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Commit 4a19ec5800fc3bb64e2d87c4d9fdd9e636086fe0 in Jan 2008 added
the new SO_MARK socket option.
This patch is based on text from the commit message.
See https://bugzilla.kernel.org/show_bug.cgi?id=16461.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fis warning from "groff -ww ..." (or "man --warnings=w ..."):
<groff: mdoc.7>:294: warning:
tab character in unquoted macro argument
In one table the distance between columns is too small in the
"ps" output. (Bug in the groff "doc.tmac" macro?)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
From "man -ww ..." (groff -ww ...):
<standard input>:541: warning:
tab character in unquoted macro argument
[+3 similar warnings]
<standard input>:813: warning: macro `Pu' not defined
Usage: .Rv -std in sections 2 and 3 only (#1669)
mdoc warning: A .Bl directive has no matching .El (#1821)
String "Pu" defined as a row of punctuation characters.
".Bl" and ".El" fixed.
Some arguments, that start with a period or are the name of a
macro, protected with "\&".
Variable name for macro ".Rv" corrected.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fix warning from "man ..." ("nroff -ww ..."):
nroff: netlink.7: warning: around line 195:
table wider than line width
Horizontal line incorporated into table.
No right adjustment of text blocks in tables.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673875
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fix warning from "man ..." ("nroff -ww ..."):
nroff: rtnetlink.7: warning: around line 415:
table wider than line width
Column gutter reduced to fit line length.
Right adjustment in text blocks removed in tables.
Some header made centered in tables.
One table put on same page.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674051
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Including <sys/types.h> and <sys/ipc.h> isn't needed on Linux
and isn't really relevant for the explanation on this page.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There's no need to mention that the 'ipc_perm' structure
is defined in <sys/ipc.h>. That's an implementation detail,
and furthermore <sys/ipc.h> is itself included by the other
System V IPC header files. The current text might lead the
reader to conclude that they must include <sys/ipc.h>, which
is not the case (it is required neither on Linux, nor by the
standards).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fix warning from "man ..." ("nroff -ww ..."):
nroff: netdevice.7: warning: around line 98:
table wider than line width
Fix: No right adjustment in text blocks in tables.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673873
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man(1) on the present page yields errors:
grotty: ... character above first line discarded
The culprit is "Dl 0 -xxxx" (vertical line) where "xxxx" is
one line (40 nroff units) too long. Or there is a bug in
"grotty". "nroff" or "tbl" makes an empty line where a page is.
The patch fixes the problem by setting the page length to
a large value.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673436
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
From "nroff -ww -t ...":
warning: around line 44: table wider than line width
Columns are made narrower (column gutter decreased).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fix following from "groff -t -ww ...":
warning: around line 53: table wider than line width
Extra indent for "troff" makes the table look misplaced
(default "ps" output).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>