netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: sctp: fix initialization of local source address on accepted ipv6 sockets
@ 2014-02-06  7:30 Matija Glavinic Pecotic
  2014-02-06 10:13 ` Daniel Borkmann
  2014-02-07  4:40 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Matija Glavinic Pecotic @ 2014-02-06  7:30 UTC (permalink / raw)
  To: linux-sctp@vger.kernel.org; +Cc: netdev@vger.kernel.org

commit 	efe4208f47f907b86f528788da711e8ab9dea44d:
'ipv6: make lookups simpler and faster' broke initialization of local source
address on accepted ipv6 sockets. Before the mentioned commit receive address
was copied along with the contents of ipv6_pinfo in sctp_v6_create_accept_sk.
Now when it is moved, it has to be copied separately.

This also fixes lksctp's ipv6 regression in a sense that test_getname_v6, TC5 -
'getsockname on a connected server socket' now passes.

Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nsn.com>

--- net-next.orig/net/sctp/ipv6.c
+++ net-next/net/sctp/ipv6.c
@@ -662,6 +662,8 @@ static struct sock *sctp_v6_create_accep
 	 */
 	sctp_v6_to_sk_daddr(&asoc->peer.primary_addr, newsk);
 
+	newsk->sk_v6_rcv_saddr = sk->sk_v6_rcv_saddr;
+
 	sk_refcnt_debug_inc(newsk);
 
 	if (newsk->sk_prot->init(newsk)) {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: sctp: fix initialization of local source address on accepted ipv6 sockets
  2014-02-06  7:30 [PATCH] net: sctp: fix initialization of local source address on accepted ipv6 sockets Matija Glavinic Pecotic
@ 2014-02-06 10:13 ` Daniel Borkmann
  2014-02-06 10:48   ` Matija Glavinic Pecotic
  2014-02-07  4:40 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Borkmann @ 2014-02-06 10:13 UTC (permalink / raw)
  To: Matija Glavinic Pecotic
  Cc: linux-sctp@vger.kernel.org, netdev@vger.kernel.org

Hi Matija,

On 02/06/2014 08:30 AM, Matija Glavinic Pecotic wrote:
> commit 	efe4208f47f907b86f528788da711e8ab9dea44d:
> 'ipv6: make lookups simpler and faster' broke initialization of local source
> address on accepted ipv6 sockets. Before the mentioned commit receive address
> was copied along with the contents of ipv6_pinfo in sctp_v6_create_accept_sk.
> Now when it is moved, it has to be copied separately.
>
> This also fixes lksctp's ipv6 regression in a sense that test_getname_v6, TC5 -
> 'getsockname on a connected server socket' now passes.
>
> Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nsn.com>

1) What about the status of http://patchwork.ozlabs.org/patch/311958/ ? Are
    you still working on a v2?

2) There already has been some discussion in [1,2] about that issue and an
    RFC patch for net-next has been proposed in [3] for fixing it on a more
    general scope. I need to get back to that when net-next opens and when
    I'm back from the conference trip I'm right now. It's however net-next
    material for sure.

   [1] http://patchwork.ozlabs.org/patch/292245/
   [2] http://patchwork.ozlabs.org/patch/292352/
   [3] http://www.spinics.net/lists/linux-sctp/msg03089.html

Best,

Daniel

> --- net-next.orig/net/sctp/ipv6.c
> +++ net-next/net/sctp/ipv6.c
> @@ -662,6 +662,8 @@ static struct sock *sctp_v6_create_accep
>   	 */
>   	sctp_v6_to_sk_daddr(&asoc->peer.primary_addr, newsk);
>
> +	newsk->sk_v6_rcv_saddr = sk->sk_v6_rcv_saddr;
> +
>   	sk_refcnt_debug_inc(newsk);
>
>   	if (newsk->sk_prot->init(newsk)) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: sctp: fix initialization of local source address on accepted ipv6 sockets
  2014-02-06 10:13 ` Daniel Borkmann
@ 2014-02-06 10:48   ` Matija Glavinic Pecotic
  0 siblings, 0 replies; 4+ messages in thread
From: Matija Glavinic Pecotic @ 2014-02-06 10:48 UTC (permalink / raw)
  To: ext Daniel Borkmann; +Cc: linux-sctp@vger.kernel.org, netdev@vger.kernel.org

Hello Daniel,

On 02/06/2014 11:13 AM, ext Daniel Borkmann wrote:
> Hi Matija,
> 
> On 02/06/2014 08:30 AM, Matija Glavinic Pecotic wrote:
>> commit     efe4208f47f907b86f528788da711e8ab9dea44d:
>> 'ipv6: make lookups simpler and faster' broke initialization of local source
>> address on accepted ipv6 sockets. Before the mentioned commit receive address
>> was copied along with the contents of ipv6_pinfo in sctp_v6_create_accept_sk.
>> Now when it is moved, it has to be copied separately.
>>
>> This also fixes lksctp's ipv6 regression in a sense that test_getname_v6, TC5 -
>> 'getsockname on a connected server socket' now passes.
>>
>> Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nsn.com>
> 
> 1) What about the status of http://patchwork.ozlabs.org/patch/311958/ ? Are
>    you still working on a v2?

of course, but as I mentioned, patch breaks regression. I can justify that, but I need to fix those broken TCs. This one got in a way while doing that. I'm also a bit busy lately so thats why I'm slower on that one.

> 2) There already has been some discussion in [1,2] about that issue and an
>    RFC patch for net-next has been proposed in [3] for fixing it on a more
>    general scope. I need to get back to that when net-next opens and when
>    I'm back from the conference trip I'm right now. It's however net-next
>    material for sure.

yes, that one seems to be better solution.

Regards,

Matija

>   [1] http://patchwork.ozlabs.org/patch/292245/
>   [2] http://patchwork.ozlabs.org/patch/292352/
>   [3] http://www.spinics.net/lists/linux-sctp/msg03089.html
> 
> Best,
> 
> Daniel
> 
>> --- net-next.orig/net/sctp/ipv6.c
>> +++ net-next/net/sctp/ipv6.c
>> @@ -662,6 +662,8 @@ static struct sock *sctp_v6_create_accep
>>        */
>>       sctp_v6_to_sk_daddr(&asoc->peer.primary_addr, newsk);
>>
>> +    newsk->sk_v6_rcv_saddr = sk->sk_v6_rcv_saddr;
>> +
>>       sk_refcnt_debug_inc(newsk);
>>
>>       if (newsk->sk_prot->init(newsk)) {
>> -- 
>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: sctp: fix initialization of local source address on accepted ipv6 sockets
  2014-02-06  7:30 [PATCH] net: sctp: fix initialization of local source address on accepted ipv6 sockets Matija Glavinic Pecotic
  2014-02-06 10:13 ` Daniel Borkmann
@ 2014-02-07  4:40 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2014-02-07  4:40 UTC (permalink / raw)
  To: matija.glavinic-pecotic.ext; +Cc: linux-sctp, netdev

From: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nsn.com>
Date: Thu, 06 Feb 2014 08:30:10 +0100

> commit 	efe4208f47f907b86f528788da711e8ab9dea44d:
> 'ipv6: make lookups simpler and faster' broke initialization of local source
> address on accepted ipv6 sockets. Before the mentioned commit receive address
> was copied along with the contents of ipv6_pinfo in sctp_v6_create_accept_sk.
> Now when it is moved, it has to be copied separately.
> 
> This also fixes lksctp's ipv6 regression in a sense that test_getname_v6, TC5 -
> 'getsockname on a connected server socket' now passes.
> 
> Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nsn.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-07  4:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06  7:30 [PATCH] net: sctp: fix initialization of local source address on accepted ipv6 sockets Matija Glavinic Pecotic
2014-02-06 10:13 ` Daniel Borkmann
2014-02-06 10:48   ` Matija Glavinic Pecotic
2014-02-07  4:40 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).