diff options
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/feat.h | 2 | ||||
-rw-r--r-- | net/dccp/ipv4.c | 3 | ||||
-rw-r--r-- | net/dccp/ipv6.c | 8 | ||||
-rw-r--r-- | net/dccp/options.c | 2 | ||||
-rw-r--r-- | net/dccp/proto.c | 4 |
5 files changed, 11 insertions, 8 deletions
diff --git a/net/dccp/feat.h b/net/dccp/feat.h index 6048373c7186..b44c45504fb6 100644 --- a/net/dccp/feat.h +++ b/net/dccp/feat.h | |||
@@ -26,4 +26,6 @@ extern void dccp_feat_clean(struct dccp_minisock *dmsk); | |||
26 | extern int dccp_feat_clone(struct sock *oldsk, struct sock *newsk); | 26 | extern int dccp_feat_clone(struct sock *oldsk, struct sock *newsk); |
27 | extern int dccp_feat_init(struct dccp_minisock *dmsk); | 27 | extern int dccp_feat_init(struct dccp_minisock *dmsk); |
28 | 28 | ||
29 | extern int dccp_feat_default_sequence_window; | ||
30 | |||
29 | #endif /* _DCCP_FEAT_H */ | 31 | #endif /* _DCCP_FEAT_H */ |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index c3073e7e81d3..7f56f7e8f571 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -504,8 +504,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
504 | ireq = inet_rsk(req); | 504 | ireq = inet_rsk(req); |
505 | ireq->loc_addr = daddr; | 505 | ireq->loc_addr = daddr; |
506 | ireq->rmt_addr = saddr; | 506 | ireq->rmt_addr = saddr; |
507 | req->rcv_wnd = 100; /* Fake, option parsing will get the | 507 | req->rcv_wnd = dccp_feat_default_sequence_window; |
508 | right value */ | ||
509 | ireq->opt = NULL; | 508 | ireq->opt = NULL; |
510 | 509 | ||
511 | /* | 510 | /* |
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index ff42bc43263d..610c722ac27f 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include "dccp.h" | 32 | #include "dccp.h" |
33 | #include "ipv6.h" | 33 | #include "ipv6.h" |
34 | #include "feat.h" | ||
34 | 35 | ||
35 | /* Socket used for sending RSTs and ACKs */ | 36 | /* Socket used for sending RSTs and ACKs */ |
36 | static struct socket *dccp_v6_ctl_socket; | 37 | static struct socket *dccp_v6_ctl_socket; |
@@ -229,7 +230,7 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
229 | ipv6_addr_copy(&np->saddr, saddr); | 230 | ipv6_addr_copy(&np->saddr, saddr); |
230 | inet->rcv_saddr = LOOPBACK4_IPV6; | 231 | inet->rcv_saddr = LOOPBACK4_IPV6; |
231 | 232 | ||
232 | ip6_dst_store(sk, dst, NULL); | 233 | __ip6_dst_store(sk, dst, NULL); |
233 | 234 | ||
234 | icsk->icsk_ext_hdr_len = 0; | 235 | icsk->icsk_ext_hdr_len = 0; |
235 | if (np->opt != NULL) | 236 | if (np->opt != NULL) |
@@ -707,8 +708,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
707 | ireq = inet_rsk(req); | 708 | ireq = inet_rsk(req); |
708 | ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr); | 709 | ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr); |
709 | ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr); | 710 | ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr); |
710 | req->rcv_wnd = 100; /* Fake, option parsing will get the | 711 | req->rcv_wnd = dccp_feat_default_sequence_window; |
711 | right value */ | ||
712 | ireq6->pktopts = NULL; | 712 | ireq6->pktopts = NULL; |
713 | 713 | ||
714 | if (ipv6_opt_accepted(sk, skb) || | 714 | if (ipv6_opt_accepted(sk, skb) || |
@@ -863,7 +863,7 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk, | |||
863 | * comment in that function for the gory details. -acme | 863 | * comment in that function for the gory details. -acme |
864 | */ | 864 | */ |
865 | 865 | ||
866 | ip6_dst_store(newsk, dst, NULL); | 866 | __ip6_dst_store(newsk, dst, NULL); |
867 | newsk->sk_route_caps = dst->dev->features & ~(NETIF_F_IP_CSUM | | 867 | newsk->sk_route_caps = dst->dev->features & ~(NETIF_F_IP_CSUM | |
868 | NETIF_F_TSO); | 868 | NETIF_F_TSO); |
869 | newdp6 = (struct dccp6_sock *)newsk; | 869 | newdp6 = (struct dccp6_sock *)newsk; |
diff --git a/net/dccp/options.c b/net/dccp/options.c index c3cda1e39aa8..daf72bb671f0 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c | |||
@@ -29,6 +29,8 @@ int dccp_feat_default_ack_ratio = DCCPF_INITIAL_ACK_RATIO; | |||
29 | int dccp_feat_default_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR; | 29 | int dccp_feat_default_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR; |
30 | int dccp_feat_default_send_ndp_count = DCCPF_INITIAL_SEND_NDP_COUNT; | 30 | int dccp_feat_default_send_ndp_count = DCCPF_INITIAL_SEND_NDP_COUNT; |
31 | 31 | ||
32 | EXPORT_SYMBOL_GPL(dccp_feat_default_sequence_window); | ||
33 | |||
32 | void dccp_minisock_init(struct dccp_minisock *dmsk) | 34 | void dccp_minisock_init(struct dccp_minisock *dmsk) |
33 | { | 35 | { |
34 | dmsk->dccpms_sequence_window = dccp_feat_default_sequence_window; | 36 | dmsk->dccpms_sequence_window = dccp_feat_default_sequence_window; |
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index f4f0627ea41c..6f14bb5a28d4 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -484,7 +484,7 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname, | |||
484 | err = -EINVAL; | 484 | err = -EINVAL; |
485 | else | 485 | else |
486 | err = dccp_setsockopt_change(sk, DCCPO_CHANGE_L, | 486 | err = dccp_setsockopt_change(sk, DCCPO_CHANGE_L, |
487 | (struct dccp_so_feat *) | 487 | (struct dccp_so_feat __user *) |
488 | optval); | 488 | optval); |
489 | break; | 489 | break; |
490 | 490 | ||
@@ -493,7 +493,7 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname, | |||
493 | err = -EINVAL; | 493 | err = -EINVAL; |
494 | else | 494 | else |
495 | err = dccp_setsockopt_change(sk, DCCPO_CHANGE_R, | 495 | err = dccp_setsockopt_change(sk, DCCPO_CHANGE_R, |
496 | (struct dccp_so_feat *) | 496 | (struct dccp_so_feat __user *) |
497 | optval); | 497 | optval); |
498 | break; | 498 | break; |
499 | 499 | ||