<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/dccp/ipv4.c, branch v4.3</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>inet: fix possible panic in reqsk_queue_unlink()</title>
<updated>2015-04-24T15:39:15+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-04-24T01:03:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=b357a364c57c940ddb932224542494363df37378'/>
<id>b357a364c57c940ddb932224542494363df37378</id>
<content type='text'>
[ 3897.923145] BUG: unable to handle kernel NULL pointer dereference at
 0000000000000080
[ 3897.931025] IP: [&lt;ffffffffa9f27686&gt;] reqsk_timer_handler+0x1a6/0x243

There is a race when reqsk_timer_handler() and tcp_check_req() call
inet_csk_reqsk_queue_unlink() on the same req at the same time.

Before commit fa76ce7328b2 ("inet: get rid of central tcp/dccp listener
timer"), listener spinlock was held and race could not happen.

To solve this bug, we change reqsk_queue_unlink() to not assume req
must be found, and we return a status, to conditionally release a
refcount on the request sock.

This also means tcp_check_req() in non fastopen case might or not
consume req refcount, so tcp_v6_hnd_req() &amp; tcp_v4_hnd_req() have
to properly handle this.

(Same remark for dccp_check_req() and its callers)

inet_csk_reqsk_queue_drop() is now too big to be inlined, as it is
called 4 times in tcp and 3 times in dccp.

Fixes: fa76ce7328b2 ("inet: get rid of central tcp/dccp listener timer")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ 3897.923145] BUG: unable to handle kernel NULL pointer dereference at
 0000000000000080
[ 3897.931025] IP: [&lt;ffffffffa9f27686&gt;] reqsk_timer_handler+0x1a6/0x243

There is a race when reqsk_timer_handler() and tcp_check_req() call
inet_csk_reqsk_queue_unlink() on the same req at the same time.

Before commit fa76ce7328b2 ("inet: get rid of central tcp/dccp listener
timer"), listener spinlock was held and race could not happen.

To solve this bug, we change reqsk_queue_unlink() to not assume req
must be found, and we return a status, to conditionally release a
refcount on the request sock.

This also means tcp_check_req() in non fastopen case might or not
consume req refcount, so tcp_v6_hnd_req() &amp; tcp_v4_hnd_req() have
to properly handle this.

(Same remark for dccp_check_req() and its callers)

inet_csk_reqsk_queue_drop() is now too big to be inlined, as it is
called 4 times in tcp and 3 times in dccp.

Fixes: fa76ce7328b2 ("inet: get rid of central tcp/dccp listener timer")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: fix double request socket freeing</title>
<updated>2015-03-24T01:40:48+00:00</updated>
<author>
<name>Fan Du</name>
<email>fan.du@intel.com</email>
</author>
<published>2015-03-23T22:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=c69736696cf3742b37d850289dc0d7ead177bb14'/>
<id>c69736696cf3742b37d850289dc0d7ead177bb14</id>
<content type='text'>
Eric Hugne reported following error :

I'm hitting this warning on latest net-next when i try to SSH into a machine
with eth0 added to a bridge (but i think the problem is older than that)

Steps to reproduce:
node2 ~ # brctl addif br0 eth0
[  223.758785] device eth0 entered promiscuous mode
node2 ~ # ip link set br0 up
[  244.503614] br0: port 1(eth0) entered forwarding state
[  244.505108] br0: port 1(eth0) entered forwarding state
node2 ~ # [  251.160159] ------------[ cut here ]------------
[  251.160831] WARNING: CPU: 0 PID: 3 at include/net/request_sock.h:102 tcp_v4_err+0x6b1/0x720()
[  251.162077] Modules linked in:
[  251.162496] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.0.0-rc3+ #18
[  251.163334] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  251.164078]  ffffffff81a8365c ffff880038a6ba18 ffffffff8162ace4 0000000000009898
[  251.165084]  0000000000000000 ffff880038a6ba58 ffffffff8104da85 ffff88003fa437c0
[  251.166195]  ffff88003fa437c0 ffff88003fa74e00 ffff88003fa43bb8 ffff88003fad99a0
[  251.167203] Call Trace:
[  251.167533]  [&lt;ffffffff8162ace4&gt;] dump_stack+0x45/0x57
[  251.168206]  [&lt;ffffffff8104da85&gt;] warn_slowpath_common+0x85/0xc0
[  251.169239]  [&lt;ffffffff8104db65&gt;] warn_slowpath_null+0x15/0x20
[  251.170271]  [&lt;ffffffff81559d51&gt;] tcp_v4_err+0x6b1/0x720
[  251.171408]  [&lt;ffffffff81630d03&gt;] ? _raw_read_lock_irq+0x3/0x10
[  251.172589]  [&lt;ffffffff81534e20&gt;] ? inet_del_offload+0x40/0x40
[  251.173366]  [&lt;ffffffff81569295&gt;] icmp_socket_deliver+0x65/0xb0
[  251.174134]  [&lt;ffffffff815693a2&gt;] icmp_unreach+0xc2/0x280
[  251.174820]  [&lt;ffffffff8156a82d&gt;] icmp_rcv+0x2bd/0x3a0
[  251.175473]  [&lt;ffffffff81534ea2&gt;] ip_local_deliver_finish+0x82/0x1e0
[  251.176282]  [&lt;ffffffff815354d8&gt;] ip_local_deliver+0x88/0x90
[  251.177004]  [&lt;ffffffff815350f0&gt;] ip_rcv_finish+0xf0/0x310
[  251.177693]  [&lt;ffffffff815357bc&gt;] ip_rcv+0x2dc/0x390
[  251.178336]  [&lt;ffffffff814f5da3&gt;] __netif_receive_skb_core+0x713/0xa20
[  251.179170]  [&lt;ffffffff814f7fca&gt;] __netif_receive_skb+0x1a/0x80
[  251.179922]  [&lt;ffffffff814f97d4&gt;] process_backlog+0x94/0x120
[  251.180639]  [&lt;ffffffff814f9612&gt;] net_rx_action+0x1e2/0x310
[  251.181356]  [&lt;ffffffff81051267&gt;] __do_softirq+0xa7/0x290
[  251.182046]  [&lt;ffffffff81051469&gt;] run_ksoftirqd+0x19/0x30
[  251.182726]  [&lt;ffffffff8106cc23&gt;] smpboot_thread_fn+0x153/0x1d0
[  251.183485]  [&lt;ffffffff8106cad0&gt;] ? SyS_setgroups+0x130/0x130
[  251.184228]  [&lt;ffffffff8106935e&gt;] kthread+0xee/0x110
[  251.184871]  [&lt;ffffffff81069270&gt;] ? kthread_create_on_node+0x1b0/0x1b0
[  251.185690]  [&lt;ffffffff81631108&gt;] ret_from_fork+0x58/0x90
[  251.186385]  [&lt;ffffffff81069270&gt;] ? kthread_create_on_node+0x1b0/0x1b0
[  251.187216] ---[ end trace c947fc7b24e42ea1 ]---
[  259.542268] br0: port 1(eth0) entered forwarding state

Remove the double calls to reqsk_put()

[edumazet] :

I got confused because reqsk_timer_handler() _has_ to call
reqsk_put(req) after calling inet_csk_reqsk_queue_drop(), as
the timer handler holds a reference on req.

Signed-off-by: Fan Du &lt;fan.du@intel.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Fixes: fa76ce7328b2 ("inet: get rid of central tcp/dccp listener timer")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Eric Hugne reported following error :

I'm hitting this warning on latest net-next when i try to SSH into a machine
with eth0 added to a bridge (but i think the problem is older than that)

Steps to reproduce:
node2 ~ # brctl addif br0 eth0
[  223.758785] device eth0 entered promiscuous mode
node2 ~ # ip link set br0 up
[  244.503614] br0: port 1(eth0) entered forwarding state
[  244.505108] br0: port 1(eth0) entered forwarding state
node2 ~ # [  251.160159] ------------[ cut here ]------------
[  251.160831] WARNING: CPU: 0 PID: 3 at include/net/request_sock.h:102 tcp_v4_err+0x6b1/0x720()
[  251.162077] Modules linked in:
[  251.162496] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.0.0-rc3+ #18
[  251.163334] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  251.164078]  ffffffff81a8365c ffff880038a6ba18 ffffffff8162ace4 0000000000009898
[  251.165084]  0000000000000000 ffff880038a6ba58 ffffffff8104da85 ffff88003fa437c0
[  251.166195]  ffff88003fa437c0 ffff88003fa74e00 ffff88003fa43bb8 ffff88003fad99a0
[  251.167203] Call Trace:
[  251.167533]  [&lt;ffffffff8162ace4&gt;] dump_stack+0x45/0x57
[  251.168206]  [&lt;ffffffff8104da85&gt;] warn_slowpath_common+0x85/0xc0
[  251.169239]  [&lt;ffffffff8104db65&gt;] warn_slowpath_null+0x15/0x20
[  251.170271]  [&lt;ffffffff81559d51&gt;] tcp_v4_err+0x6b1/0x720
[  251.171408]  [&lt;ffffffff81630d03&gt;] ? _raw_read_lock_irq+0x3/0x10
[  251.172589]  [&lt;ffffffff81534e20&gt;] ? inet_del_offload+0x40/0x40
[  251.173366]  [&lt;ffffffff81569295&gt;] icmp_socket_deliver+0x65/0xb0
[  251.174134]  [&lt;ffffffff815693a2&gt;] icmp_unreach+0xc2/0x280
[  251.174820]  [&lt;ffffffff8156a82d&gt;] icmp_rcv+0x2bd/0x3a0
[  251.175473]  [&lt;ffffffff81534ea2&gt;] ip_local_deliver_finish+0x82/0x1e0
[  251.176282]  [&lt;ffffffff815354d8&gt;] ip_local_deliver+0x88/0x90
[  251.177004]  [&lt;ffffffff815350f0&gt;] ip_rcv_finish+0xf0/0x310
[  251.177693]  [&lt;ffffffff815357bc&gt;] ip_rcv+0x2dc/0x390
[  251.178336]  [&lt;ffffffff814f5da3&gt;] __netif_receive_skb_core+0x713/0xa20
[  251.179170]  [&lt;ffffffff814f7fca&gt;] __netif_receive_skb+0x1a/0x80
[  251.179922]  [&lt;ffffffff814f97d4&gt;] process_backlog+0x94/0x120
[  251.180639]  [&lt;ffffffff814f9612&gt;] net_rx_action+0x1e2/0x310
[  251.181356]  [&lt;ffffffff81051267&gt;] __do_softirq+0xa7/0x290
[  251.182046]  [&lt;ffffffff81051469&gt;] run_ksoftirqd+0x19/0x30
[  251.182726]  [&lt;ffffffff8106cc23&gt;] smpboot_thread_fn+0x153/0x1d0
[  251.183485]  [&lt;ffffffff8106cad0&gt;] ? SyS_setgroups+0x130/0x130
[  251.184228]  [&lt;ffffffff8106935e&gt;] kthread+0xee/0x110
[  251.184871]  [&lt;ffffffff81069270&gt;] ? kthread_create_on_node+0x1b0/0x1b0
[  251.185690]  [&lt;ffffffff81631108&gt;] ret_from_fork+0x58/0x90
[  251.186385]  [&lt;ffffffff81069270&gt;] ? kthread_create_on_node+0x1b0/0x1b0
[  251.187216] ---[ end trace c947fc7b24e42ea1 ]---
[  259.542268] br0: port 1(eth0) entered forwarding state

Remove the double calls to reqsk_put()

[edumazet] :

I got confused because reqsk_timer_handler() _has_ to call
reqsk_put(req) after calling inet_csk_reqsk_queue_drop(), as
the timer handler holds a reference on req.

Signed-off-by: Fan Du &lt;fan.du@intel.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Fixes: fa76ce7328b2 ("inet: get rid of central tcp/dccp listener timer")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv4: dccp: handle ICMP messages on DCCP_NEW_SYN_RECV request sockets</title>
<updated>2015-03-23T20:52:26+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-03-22T17:22:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=85645bab57bfc6b0b43bb96a301c4ef83925c07d'/>
<id>85645bab57bfc6b0b43bb96a301c4ef83925c07d</id>
<content type='text'>
dccp_v4_err() can restrict lookups to ehash table, and not to listeners.

Note this patch creates the infrastructure, but this means that ICMP
messages for request sockets are ignored until complete conversion.

New dccp_req_err() helper is exported so that we can use it in IPv6
in following patch.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dccp_v4_err() can restrict lookups to ehash table, and not to listeners.

Note this patch creates the infrastructure, but this means that ICMP
messages for request sockets are ignored until complete conversion.

New dccp_req_err() helper is exported so that we can use it in IPv6
in following patch.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: remove sk_listener parameter from syn_ack_timeout()</title>
<updated>2015-03-23T20:52:25+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-03-22T17:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=42cb80a2353f42913ae78074ffa1f1b4a49e5436'/>
<id>42cb80a2353f42913ae78074ffa1f1b4a49e5436</id>
<content type='text'>
It is not needed, and req-&gt;sk_listener points to the listener anyway.
request_sock argument can be const.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is not needed, and req-&gt;sk_listener points to the listener anyway.
request_sock argument can be const.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: get rid of central tcp/dccp listener timer</title>
<updated>2015-03-20T16:40:25+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-03-20T02:04:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=fa76ce7328b289b6edd476e24eb52fd634261720'/>
<id>fa76ce7328b289b6edd476e24eb52fd634261720</id>
<content type='text'>
One of the major issue for TCP is the SYNACK rtx handling,
done by inet_csk_reqsk_queue_prune(), fired by the keepalive
timer of a TCP_LISTEN socket.

This function runs for awful long times, with socket lock held,
meaning that other cpus needing this lock have to spin for hundred of ms.

SYNACK are sent in huge bursts, likely to cause severe drops anyway.

This model was OK 15 years ago when memory was very tight.

We now can afford to have a timer per request sock.

Timer invocations no longer need to lock the listener,
and can be run from all cpus in parallel.

With following patch increasing somaxconn width to 32 bits,
I tested a listener with more than 4 million active request sockets,
and a steady SYNFLOOD of ~200,000 SYN per second.
Host was sending ~830,000 SYNACK per second.

This is ~100 times more what we could achieve before this patch.

Later, we will get rid of the listener hash and use ehash instead.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One of the major issue for TCP is the SYNACK rtx handling,
done by inet_csk_reqsk_queue_prune(), fired by the keepalive
timer of a TCP_LISTEN socket.

This function runs for awful long times, with socket lock held,
meaning that other cpus needing this lock have to spin for hundred of ms.

SYNACK are sent in huge bursts, likely to cause severe drops anyway.

This model was OK 15 years ago when memory was very tight.

We now can afford to have a timer per request sock.

Timer invocations no longer need to lock the listener,
and can be run from all cpus in parallel.

With following patch increasing somaxconn width to 32 bits,
I tested a listener with more than 4 million active request sockets,
and a steady SYNFLOOD of ~200,000 SYN per second.
Host was sending ~830,000 SYNACK per second.

This is ~100 times more what we could achieve before this patch.

Later, we will get rid of the listener hash and use ehash instead.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: drop prev pointer handling in request sock</title>
<updated>2015-03-20T16:40:25+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-03-20T02:04:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=52452c542559ac980b48dbf22a30ee7fa0af507c'/>
<id>52452c542559ac980b48dbf22a30ee7fa0af507c</id>
<content type='text'>
When request sock are put in ehash table, the whole notion
of having a previous request to update dl_next is pointless.

Also, following patch will get rid of big purge timer,
so we want to delete a request sock without holding listener lock.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When request sock are put in ehash table, the whole notion
of having a previous request to update dl_next is pointless.

Also, following patch will get rid of big purge timer,
so we want to delete a request sock without holding listener lock.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: request sock should init IPv6/IPv4 addresses</title>
<updated>2015-03-19T02:00:35+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-03-18T21:05:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=08d2cc3b26554cae21f279b520ae5c2a3b2be421'/>
<id>08d2cc3b26554cae21f279b520ae5c2a3b2be421</id>
<content type='text'>
In order to be able to use sk_ehashfn() for request socks,
we need to initialize their IPv6/IPv4 addresses.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to be able to use sk_ehashfn() for request socks,
we need to initialize their IPv6/IPv4 addresses.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: add IPv6 support to sk_ehashfn()</title>
<updated>2015-03-19T02:00:34+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-03-18T21:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=d1e559d0b1b0d02f76a6bd5b768a99dc834ae926'/>
<id>d1e559d0b1b0d02f76a6bd5b768a99dc834ae926</id>
<content type='text'>
Intent is to converge IPv4 &amp; IPv6 inet_hash functions to
factorize code.

IPv4 sockets initialize sk_rcv_saddr and sk_v6_daddr
in this patch, thanks to new sk_daddr_set() and sk_rcv_saddr_set()
helpers.

__inet6_hash can now use sk_ehashfn() instead of a private
inet6_sk_ehashfn() and will simply use __inet_hash() in a
following patch.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Intent is to converge IPv4 &amp; IPv6 inet_hash functions to
factorize code.

IPv4 sockets initialize sk_rcv_saddr and sk_v6_daddr
in this patch, thanks to new sk_daddr_set() and sk_rcv_saddr_set()
helpers.

__inet6_hash can now use sk_ehashfn() instead of a private
inet6_sk_ehashfn() and will simply use __inet_hash() in a
following patch.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: add sk_listener argument to inet_reqsk_alloc()</title>
<updated>2015-03-18T02:01:55+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-03-18T01:32:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=407640de2152e33341ce1131dac269672c3d50f7'/>
<id>407640de2152e33341ce1131dac269672c3d50f7</id>
<content type='text'>
listener socket can be used to set net pointer, and will
be later used to hold a reference on listener.

Add a const qualifier to first argument (struct request_sock_ops *),
and factorize all write_pnet(&amp;ireq-&gt;ireq_net, sock_net(sk));

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
listener socket can be used to set net pointer, and will
be later used to hold a reference on listener.

Add a const qualifier to first argument (struct request_sock_ops *),
and factorize all write_pnet(&amp;ireq-&gt;ireq_net, sock_net(sk));

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: fill request sock ir_iif for IPv4</title>
<updated>2015-03-14T19:05:10+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-03-13T22:51:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=16f86165bd0a94a96ab99629828cc9057db50221'/>
<id>16f86165bd0a94a96ab99629828cc9057db50221</id>
<content type='text'>
Once request socks will be in ehash table, they will need to have
a valid ir_iff field.

This is currently true only for IPv6. This patch extends support
for IPv4 as well.

This means inet_diag_fill_req() can now properly use ir_iif,
which is better for IPv6 link locals anyway, as request sockets
and established sockets will propagate consistent netlink idiag_if.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Once request socks will be in ehash table, they will need to have
a valid ir_iff field.

This is currently true only for IPv6. This patch extends support
for IPv4 as well.

This means inet_diag_fill_req() can now properly use ir_iif,
which is better for IPv6 link locals anyway, as request sockets
and established sockets will propagate consistent netlink idiag_if.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
