<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv6, branch v3.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-07-05T04:37:41Z</updated>
<entry>
<title>net: bind() fix error return on wrong address family</title>
<updated>2011-07-05T04:37:41Z</updated>
<author>
<name>Marcus Meissner</name>
<email>meissner@novell.com</email>
</author>
<published>2011-07-04T01:30:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c349a528cd47e2272ded0ea358363855e86180da'/>
<id>urn:sha1:c349a528cd47e2272ded0ea358363855e86180da</id>
<content type='text'>
Hi,

Reinhard Max also pointed out that the error should EAFNOSUPPORT according
to POSIX.

The Linux manpages have it as EINVAL, some other OSes (Minix, HPUX, perhaps BSD) use
EAFNOSUPPORT. Windows uses WSAEFAULT according to MSDN.

Other protocols error values in their af bind() methods in current mainline git as far
as a brief look shows:
	EAFNOSUPPORT: atm, appletalk, l2tp, llc, phonet, rxrpc
	EINVAL: ax25, bluetooth, decnet, econet, ieee802154, iucv, netlink, netrom, packet, rds, rose, unix, x25,
	No check?: can/raw, ipv6/raw, irda, l2tp/l2tp_ip

Ciao, Marcus

Signed-off-by: Marcus Meissner &lt;meissner@suse.de&gt;
Cc: Reinhard Max &lt;max@suse.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Don't put artificial limit on routing table size.</title>
<updated>2011-07-02T00:30:43Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-06-24T22:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=957c665f37007de93ccbe45902a23143724170d0'/>
<id>urn:sha1:957c665f37007de93ccbe45902a23143724170d0</id>
<content type='text'>
IPV6, unlike IPV4, doesn't have a routing cache.

Routing table entries, as well as clones made in response
to route lookup requests, all live in the same table.  And
all of these things are together collected in the destination
cache table for ipv6.

This means that routing table entries count against the garbage
collection limits, even though such entries cannot ever be reclaimed
and are added explicitly by the administrator (rather than being
created in response to lookups).

Therefore it makes no sense to count ipv6 routing table entries
against the GC limits.

Add a DST_NOCOUNT destination cache entry flag, and skip the counting
if it is set.  Use this flag bit in ipv6 when adding routing table
entries.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Don't change dst-&gt;flags using assignments.</title>
<updated>2011-07-02T00:30:43Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-06-24T22:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=11d53b4990226247a950e2b1ccfa4cf93bfbc822'/>
<id>urn:sha1:11d53b4990226247a950e2b1ccfa4cf93bfbc822</id>
<content type='text'>
This blows away any flags already set in the entry.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>udp/recvmsg: Clear MSG_TRUNC flag when starting over for a new packet</title>
<updated>2011-06-22T05:34:27Z</updated>
<author>
<name>Xufeng Zhang</name>
<email>xufeng.zhang@windriver.com</email>
</author>
<published>2011-06-21T10:43:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9cfaa8def1c795a512bc04f2aec333b03724ca2e'/>
<id>urn:sha1:9cfaa8def1c795a512bc04f2aec333b03724ca2e</id>
<content type='text'>
Consider this scenario: When the size of the first received udp packet
is bigger than the receive buffer, MSG_TRUNC bit is set in msg-&gt;msg_flags.
However, if checksum error happens and this is a blocking socket, it will
goto try_again loop to receive the next packet.  But if the size of the
next udp packet is smaller than receive buffer, MSG_TRUNC flag should not
be set, but because MSG_TRUNC bit is not cleared in msg-&gt;msg_flags before
receive the next packet, MSG_TRUNC is still set, which is wrong.

Fix this problem by clearing MSG_TRUNC flag when starting over for a
new packet.

Signed-off-by: Xufeng Zhang &lt;xufeng.zhang@windriver.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6/udp: Use the correct variable to determine non-blocking condition</title>
<updated>2011-06-22T05:34:27Z</updated>
<author>
<name>Xufeng Zhang</name>
<email>xufeng.zhang@windriver.com</email>
</author>
<published>2011-06-21T10:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=32c90254ed4a0c698caa0794ebb4de63fcc69631'/>
<id>urn:sha1:32c90254ed4a0c698caa0794ebb4de63fcc69631</id>
<content type='text'>
udpv6_recvmsg() function is not using the correct variable to determine
whether or not the socket is in non-blocking operation, this will lead
to unexpected behavior when a UDP checksum error occurs.

Consider a non-blocking udp receive scenario: when udpv6_recvmsg() is
called by sock_common_recvmsg(), MSG_DONTWAIT bit of flags variable in
udpv6_recvmsg() is cleared by "flags &amp; ~MSG_DONTWAIT" in this call:

    err = sk-&gt;sk_prot-&gt;recvmsg(iocb, sk, msg, size, flags &amp; MSG_DONTWAIT,
                   flags &amp; ~MSG_DONTWAIT, &amp;addr_len);

i.e. with udpv6_recvmsg() getting these values:

	int noblock = flags &amp; MSG_DONTWAIT
	int flags = flags &amp; ~MSG_DONTWAIT

So, when udp checksum error occurs, the execution will go to
csum_copy_err, and then the problem happens:

    csum_copy_err:
            ...............
            if (flags &amp; MSG_DONTWAIT)
                    return -EAGAIN;
            goto try_again;
            ...............

But it will always go to try_again as MSG_DONTWAIT has been cleared
from flags at call time -- only noblock contains the original value
of MSG_DONTWAIT, so the test should be:

            if (noblock)
                    return -EAGAIN;

This is also consistent with what the ipv4/udp code does.

Signed-off-by: Xufeng Zhang &lt;xufeng.zhang@windriver.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: rfs: enable RFS before first data packet is received</title>
<updated>2011-06-17T19:27:31Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-06-17T03:45:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1eddceadb0d6441cd39b2c38705a8f5fec86e770'/>
<id>urn:sha1:1eddceadb0d6441cd39b2c38705a8f5fec86e770</id>
<content type='text'>
Le jeudi 16 juin 2011 à 23:38 -0400, David Miller a écrit :
&gt; From: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
&gt; Date: Fri, 17 Jun 2011 00:50:46 +0100
&gt;
&gt; &gt; On Wed, 2011-06-15 at 04:15 +0200, Eric Dumazet wrote:
&gt; &gt;&gt; @@ -1594,6 +1594,7 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
&gt; &gt;&gt;  			goto discard;
&gt; &gt;&gt;
&gt; &gt;&gt;  		if (nsk != sk) {
&gt; &gt;&gt; +			sock_rps_save_rxhash(nsk, skb-&gt;rxhash);
&gt; &gt;&gt;  			if (tcp_child_process(sk, nsk, skb)) {
&gt; &gt;&gt;  				rsk = nsk;
&gt; &gt;&gt;  				goto reset;
&gt; &gt;&gt;
&gt; &gt;
&gt; &gt; I haven't tried this, but it looks reasonable to me.
&gt; &gt;
&gt; &gt; What about IPv6?  The logic in tcp_v6_do_rcv() looks very similar.
&gt;
&gt; Indeed ipv6 side needs the same fix.
&gt;
&gt; Eric please add that part and resubmit.  And in fact I might stick
&gt; this into net-2.6 instead of net-next-2.6
&gt;

OK, here is the net-2.6 based one then, thanks !

[PATCH v2] net: rfs: enable RFS before first data packet is received

First packet received on a passive tcp flow is not correctly RFS
steered.

One sock_rps_record_flow() call is missing in inet_accept()

But before that, we also must record rxhash when child socket is setup.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Tom Herbert &lt;therbert@google.com&gt;
CC: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
CC: Jamal Hadi Salim &lt;hadi@cyberus.ca&gt;
Signed-off-by: David S. Miller &lt;davem@conan.davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: fix looped (broad|multi)cast's MAC handling</title>
<updated>2011-06-16T15:27:04Z</updated>
<author>
<name>Nicolas Cavallari</name>
<email>cavallar@lri.fr</email>
</author>
<published>2011-06-16T15:27:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c38de4c1f8da799bdca0e4bb40ca13f2174d3e8'/>
<id>urn:sha1:2c38de4c1f8da799bdca0e4bb40ca13f2174d3e8</id>
<content type='text'>
By default, when broadcast or multicast packet are sent from a local
application, they are sent to the interface then looped by the kernel
to other local applications, going throught netfilter hooks in the
process.

These looped packet have their MAC header removed from the skb by the
kernel looping code. This confuse various netfilter's netlink queue,
netlink log and the legacy ip_queue, because they try to extract a
hardware address from these packets, but extracts a part of the IP
header instead.

This patch prevent NFQUEUE, NFLOG and ip_QUEUE to include a MAC header
if there is none in the packet.

Signed-off-by: Nicolas Cavallari &lt;cavallar@lri.fr&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>net/ipv6: check for mistakenly passed in non-AF_INET6 sockaddrs</title>
<updated>2011-06-06T21:48:16Z</updated>
<author>
<name>Marcus Meissner</name>
<email>meissner@suse.de</email>
</author>
<published>2011-06-06T06:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a079c305ad4dda9708b7a29db4a8bd38e21c3a6'/>
<id>urn:sha1:5a079c305ad4dda9708b7a29db4a8bd38e21c3a6</id>
<content type='text'>
Same check as for IPv4, also do for IPv6.

(If you passed in a IPv4 sockaddr_in here, the sizeof check
 in the line before would have triggered already though.)

Signed-off-by: Marcus Meissner &lt;meissner@suse.de&gt;
Cc: Reinhard Max &lt;max@suse.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: use unsigned variables for packet lengths in ip[6]_queue.</title>
<updated>2011-06-05T23:37:16Z</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2011-05-28T00:36:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d232b8dded624af3e346b13807a591c63b601c44'/>
<id>urn:sha1:d232b8dded624af3e346b13807a591c63b601c44</id>
<content type='text'>
Netlink message lengths can't be negative, so use unsigned variables.

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_conntrack: fix ct refcount leak in l4proto-&gt;error()</title>
<updated>2011-06-05T23:37:02Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2011-06-02T13:08:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=88ed01d17b44bc2bed4ad4835d3b1099bff3dd71'/>
<id>urn:sha1:88ed01d17b44bc2bed4ad4835d3b1099bff3dd71</id>
<content type='text'>
This patch fixes a refcount leak of ct objects that may occur if
l4proto-&gt;error() assigns one conntrack object to one skbuff. In
that case, we have to skip further processing in nf_conntrack_in().

With this patch, we can also fix wrong return values (-NF_ACCEPT)
for special cases in ICMP[v6] that should not bump the invalid/error
statistic counters.

Reported-by: Zoltan Menyhart &lt;Zoltan.Menyhart@bull.net&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
</feed>
