On 12/24/2013 02:19 PM, Daniel Borkmann wrote:
Wang reported an issue that lksctp's test_getname_v6 seems to fail. The issue is that we do not copy sk_v6_rcv_saddr over to the new socket, although the comment above says so regarding rcv_saddr. Commit 914e1c8b6980 ("sctp: Inherit all socket options from parent correctly.") originally moved that over to sctp_copy_sock(), but after commit efe4208f47f9 ("ipv6: make lookups simpler and faster") this no longer holds and the actual value of sk_v6_rcv_saddr was no longer being migrated. The issue seems to be deeper than that though. We always used to do a partial copy of socket members in accept/peeloff case. This means that also newly added members to the kernel's socket representation weren't inherited to spawned sockets, for example, Eric points out that settings of SO_MAX_PACING_RATE would be broken on SCTP as well. So lets get rid of this restriction by using sk_copy_sanitize(). With this patch, the lksctp test suite also passes again for IPv6. Fixes: efe4208f47f9 ("ipv6: make lookups simpler and faster") Reported-by: Wang Weidong <wangweidong1@xxxxxxxxxx> Suggested-by: Eric Dumazet <eric.dumazet@xxxxxxxxx> Not-yet-signed-off-by: Daniel Borkmann <dborkman@xxxxxxxxxx> ---
One more thing for the non-RFC later on:
out: + if (newsk) { + bh_unlock_sock(newsk); + sock_put(newsk);
This also needs to be done in error path.
+ } return newsk; }
-- To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html