diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-30 17:53:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-30 17:53:32 -0400 |
commit | 65fb0d23fcddd8697c871047b700c78817bdaa43 (patch) | |
tree | 119e6e5f276622c4c862f6c9b6d795264ba1603a /net/sctp/protocol.c | |
parent | 8c083f081d0014057901c68a0a3e0f8ca7ac8d23 (diff) | |
parent | dfbbe89e197a77f2c8046a51c74e33e35f878080 (diff) |
Merge branch 'linus' into cpumask-for-linus
Conflicts:
arch/x86/kernel/cpu/common.c
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r-- | net/sctp/protocol.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index c4986d0f7419..cb198af8887c 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -589,46 +589,21 @@ static int sctp_v4_is_ce(const struct sk_buff *skb) | |||
589 | static struct sock *sctp_v4_create_accept_sk(struct sock *sk, | 589 | static struct sock *sctp_v4_create_accept_sk(struct sock *sk, |
590 | struct sctp_association *asoc) | 590 | struct sctp_association *asoc) |
591 | { | 591 | { |
592 | struct inet_sock *inet = inet_sk(sk); | ||
593 | struct inet_sock *newinet; | ||
594 | struct sock *newsk = sk_alloc(sock_net(sk), PF_INET, GFP_KERNEL, | 592 | struct sock *newsk = sk_alloc(sock_net(sk), PF_INET, GFP_KERNEL, |
595 | sk->sk_prot); | 593 | sk->sk_prot); |
594 | struct inet_sock *newinet; | ||
596 | 595 | ||
597 | if (!newsk) | 596 | if (!newsk) |
598 | goto out; | 597 | goto out; |
599 | 598 | ||
600 | sock_init_data(NULL, newsk); | 599 | sock_init_data(NULL, newsk); |
601 | 600 | ||
602 | newsk->sk_type = SOCK_STREAM; | 601 | sctp_copy_sock(newsk, sk, asoc); |
603 | |||
604 | newsk->sk_no_check = sk->sk_no_check; | ||
605 | newsk->sk_reuse = sk->sk_reuse; | ||
606 | newsk->sk_shutdown = sk->sk_shutdown; | ||
607 | |||
608 | newsk->sk_destruct = inet_sock_destruct; | ||
609 | newsk->sk_family = PF_INET; | ||
610 | newsk->sk_protocol = IPPROTO_SCTP; | ||
611 | newsk->sk_backlog_rcv = sk->sk_prot->backlog_rcv; | ||
612 | sock_reset_flag(newsk, SOCK_ZAPPED); | 602 | sock_reset_flag(newsk, SOCK_ZAPPED); |
613 | 603 | ||
614 | newinet = inet_sk(newsk); | 604 | newinet = inet_sk(newsk); |
615 | 605 | ||
616 | /* Initialize sk's sport, dport, rcv_saddr and daddr for | ||
617 | * getsockname() and getpeername() | ||
618 | */ | ||
619 | newinet->sport = inet->sport; | ||
620 | newinet->saddr = inet->saddr; | ||
621 | newinet->rcv_saddr = inet->rcv_saddr; | ||
622 | newinet->dport = htons(asoc->peer.port); | ||
623 | newinet->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr; | 606 | newinet->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr; |
624 | newinet->pmtudisc = inet->pmtudisc; | ||
625 | newinet->id = asoc->next_tsn ^ jiffies; | ||
626 | |||
627 | newinet->uc_ttl = -1; | ||
628 | newinet->mc_loop = 1; | ||
629 | newinet->mc_ttl = 1; | ||
630 | newinet->mc_index = 0; | ||
631 | newinet->mc_list = NULL; | ||
632 | 607 | ||
633 | sk_refcnt_debug_inc(newsk); | 608 | sk_refcnt_debug_inc(newsk); |
634 | 609 | ||
@@ -1413,4 +1388,6 @@ MODULE_ALIAS("net-pf-" __stringify(PF_INET) "-proto-132"); | |||
1413 | MODULE_ALIAS("net-pf-" __stringify(PF_INET6) "-proto-132"); | 1388 | MODULE_ALIAS("net-pf-" __stringify(PF_INET6) "-proto-132"); |
1414 | MODULE_AUTHOR("Linux Kernel SCTP developers <lksctp-developers@lists.sourceforge.net>"); | 1389 | MODULE_AUTHOR("Linux Kernel SCTP developers <lksctp-developers@lists.sourceforge.net>"); |
1415 | MODULE_DESCRIPTION("Support for the SCTP protocol (RFC2960)"); | 1390 | MODULE_DESCRIPTION("Support for the SCTP protocol (RFC2960)"); |
1391 | module_param_named(no_checksums, sctp_checksum_disable, bool, 0644); | ||
1392 | MODULE_PARM_DESC(no_checksums, "Disable checksums computing and verification"); | ||
1416 | MODULE_LICENSE("GPL"); | 1393 | MODULE_LICENSE("GPL"); |