<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv4/ip_input.c, branch v3.9</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.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-03-01T20:56:29Z</updated>
<entry>
<title>ipv[4|6]: correct dropwatch false positive in local_deliver_finish</title>
<updated>2013-03-01T20:56:29Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2013-03-01T07:44:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d8c6f4b9b7848bca8babfc0ae43a50c8ab22fbb9'/>
<id>urn:sha1:d8c6f4b9b7848bca8babfc0ae43a50c8ab22fbb9</id>
<content type='text'>
I had a report recently of a user trying to use dropwatch to localise some frame
loss, and they were getting false positives.  Turned out they were using a user
space SCTP stack that used raw sockets to grab frames.  When we don't have a
registered protocol for a given packet, we record it as a drop, even if a raw
socket receieves the frame.  We should only record the drop in the event a raw
socket doesnt exist to receive the frames

Tested by the reported successfully

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reported-by: William Reich &lt;reich@ulticom.com&gt;
Tested-by: William Reich &lt;reich@ulticom.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
CC: William Reich &lt;reich@ulticom.com&gt;
CC: eric.dumazet@gmail.com
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Disallow non-namespace aware protocols to register.</title>
<updated>2013-02-05T19:42:23Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2013-02-05T19:42:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=547472b8e1da72ae226430c0c4273e36fc8ca768'/>
<id>urn:sha1:547472b8e1da72ae226430c0c4273e36fc8ca768</id>
<content type='text'>
All in-tree ipv4 protocol implementations are now namespace
aware.  Therefore all the run-time checks are superfluous.

Reject registry of any non-namespace aware ipv4 protocol.
Eventually we'll remove prot-&gt;netns_ok and this registry
time check as well.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: TCP early demux cleanup</title>
<updated>2012-07-30T21:53:21Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-07-29T21:06:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cca32e4bf999a34ac08d959f351f2b30bcd02460'/>
<id>urn:sha1:cca32e4bf999a34ac08d959f351f2b30bcd02460</id>
<content type='text'>
early_demux() handlers should be called in RCU context, and as we
use skb_dst_set_noref(skb, dst), caller must not exit from RCU context
before dst use (skb_dst(skb)) or release (skb_drop(dst))

Therefore, rcu_read_lock()/rcu_read_unlock() pairs around
-&gt;early_demux() are confusing and not needed :

Protocol handlers are already in an RCU read lock section.
(__netif_receive_skb() does the rcu_read_lock() )

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Early TCP socket demux</title>
<updated>2012-07-26T22:50:39Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-07-26T12:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7109986db3c945f50ceed884a30e0fd8af3b89b'/>
<id>urn:sha1:c7109986db3c945f50ceed884a30e0fd8af3b89b</id>
<content type='text'>
This is the IPv6 missing bits for infrastructure added in commit
41063e9dd1195 (ipv4: Early TCP socket demux.)

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Fix input route performance regression.</title>
<updated>2012-07-26T22:50:39Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-07-26T11:14:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c6cffba4ffa26a8ffacd0bb9f3144e34f20da7de'/>
<id>urn:sha1:c6cffba4ffa26a8ffacd0bb9f3144e34f20da7de</id>
<content type='text'>
With the routing cache removal we lost the "noref" code paths on
input, and this can kill some routing workloads.

Reinstate the noref path when we hit a cached route in the FIB
nexthops.

With help from Eric Dumazet.

Reported-by: Alexander Duyck &lt;alexander.duyck@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: early_demux fixes</title>
<updated>2012-07-24T20:54:15Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-07-24T01:19:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9cb429d692b341e972b12e6cd097364050ebbb26'/>
<id>urn:sha1:9cb429d692b341e972b12e6cd097364050ebbb26</id>
<content type='text'>
1) Remove a non needed pskb_may_pull() in tcp_v4_early_demux()
   and fix a potential bug if skb-&gt;head was reallocated
   (iph &amp; th pointers were not reloaded)

TCP stack will pull/check headers anyway.

2) must reload iph in ip_rcv_finish() after early_demux()
 call since skb-&gt;head might have changed.

3) skb-&gt;dev-&gt;ifindex can be now replaced by skb-&gt;skb_iif

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Kill ip_route_input_noref().</title>
<updated>2012-07-20T20:30:59Z</updated>
<author>
<name>David Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-07-01T02:02:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38a424e4657462fe9f8b76f01a0e879abde99ab4'/>
<id>urn:sha1:38a424e4657462fe9f8b76f01a0e879abde99ab4</id>
<content type='text'>
The "noref" argument to ip_route_input_common() is now always ignored
because we do not cache routes, and in that case we must always grab
a reference to the resulting 'dst'.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Kill early demux method return value.</title>
<updated>2012-06-28T05:01:22Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-06-28T05:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=160eb5a6b14ca2eab5c598bdbbb24c24624bad34'/>
<id>urn:sha1:160eb5a6b14ca2eab5c598bdbbb24c24624bad34</id>
<content type='text'>
It's completely unnecessary.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "ipv4: tcp: dont cache unconfirmed intput dst"</title>
<updated>2012-06-28T00:05:06Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-06-28T00:05:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c10237e077cef50e925f052e49f3b4fead9d71f9'/>
<id>urn:sha1:c10237e077cef50e925f052e49f3b4fead9d71f9</id>
<content type='text'>
This reverts commit c074da2810c118b3812f32d6754bd9ead2f169e7.

This change has several unwanted side effects:

1) Sockets will cache the DST_NOCACHE route in sk-&gt;sk_rx_dst and we'll
   thus never create a real cached route.

2) All TCP traffic will use DST_NOCACHE and never use the routing
   cache at all.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: tcp: dont cache unconfirmed intput dst</title>
<updated>2012-06-27T22:34:24Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-26T23:14:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c074da2810c118b3812f32d6754bd9ead2f169e7'/>
<id>urn:sha1:c074da2810c118b3812f32d6754bd9ead2f169e7</id>
<content type='text'>
DDOS synflood attacks hit badly IP route cache.

On typical machines, this cache is allowed to hold up to 8 Millions dst
entries, 256 bytes for each, for a total of 2GB of memory.

rt_garbage_collect() triggers and tries to cleanup things.

Eventually route cache is disabled but machine is under fire and might
OOM and crash.

This patch exploits the new TCP early demux, to set a nocache
boolean in case incoming TCP frame is for a not yet ESTABLISHED or
TIMEWAIT socket.

This 'nocache' boolean is then used in case dst entry is not found in
route cache, to create an unhashed dst entry (DST_NOCACHE)

SYN-cookie-ACK sent use a similar mechanism (ipv4: tcp: dont cache
output dst for syncookies), so after this patch, a machine is able to
absorb a DDOS synflood attack without polluting its IP route cache.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Hans Schillstrom &lt;hans.schillstrom@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
