diff options
| author | Andi Kleen <andi@basil.nowhere.org> | 2006-11-21 04:22:09 -0500 |
|---|---|---|
| committer | Andi Kleen <andi@basil.nowhere.org> | 2006-11-21 04:22:09 -0500 |
| commit | 1b7f6a626f0ff511c3840678466cbfe1d62c0b29 (patch) | |
| tree | 415e8c838c0067bff384afb8a2c91e5f7c6d11d3 /net/sctp/socket.c | |
| parent | b3edc9cec07ade41aaf1804f7c9e876afa90c862 (diff) | |
| parent | 3f5a6ca31c334011fd929501a078424c0d3f71be (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'net/sctp/socket.c')
| -rw-r--r-- | net/sctp/socket.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 9f34dec6ff8e..935bc9187fd8 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
| @@ -3372,6 +3372,7 @@ SCTP_STATIC int sctp_do_peeloff(struct sctp_association *asoc, | |||
| 3372 | { | 3372 | { |
| 3373 | struct sock *sk = asoc->base.sk; | 3373 | struct sock *sk = asoc->base.sk; |
| 3374 | struct socket *sock; | 3374 | struct socket *sock; |
| 3375 | struct inet_sock *inetsk; | ||
| 3375 | int err = 0; | 3376 | int err = 0; |
| 3376 | 3377 | ||
| 3377 | /* An association cannot be branched off from an already peeled-off | 3378 | /* An association cannot be branched off from an already peeled-off |
| @@ -3389,6 +3390,14 @@ SCTP_STATIC int sctp_do_peeloff(struct sctp_association *asoc, | |||
| 3389 | * asoc to the newsk. | 3390 | * asoc to the newsk. |
| 3390 | */ | 3391 | */ |
| 3391 | sctp_sock_migrate(sk, sock->sk, asoc, SCTP_SOCKET_UDP_HIGH_BANDWIDTH); | 3392 | sctp_sock_migrate(sk, sock->sk, asoc, SCTP_SOCKET_UDP_HIGH_BANDWIDTH); |
| 3393 | |||
| 3394 | /* Make peeled-off sockets more like 1-1 accepted sockets. | ||
| 3395 | * Set the daddr and initialize id to something more random | ||
| 3396 | */ | ||
| 3397 | inetsk = inet_sk(sock->sk); | ||
| 3398 | inetsk->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr; | ||
| 3399 | inetsk->id = asoc->next_tsn ^ jiffies; | ||
| 3400 | |||
| 3392 | *sockp = sock; | 3401 | *sockp = sock; |
| 3393 | 3402 | ||
| 3394 | return err; | 3403 | return err; |
