diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /net/dccp/minisocks.c | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/dccp/minisocks.c')
-rw-r--r-- | net/dccp/minisocks.c | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index 36db5be2a9e9..4c9e26775f72 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/dccp.h> | 13 | #include <linux/dccp.h> |
14 | #include <linux/kernel.h> | ||
14 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
15 | #include <linux/timer.h> | 16 | #include <linux/timer.h> |
16 | 17 | ||
@@ -82,8 +83,7 @@ void dccp_time_wait(struct sock *sk, int state, int timeo) | |||
82 | * socket up. We've got bigger problems than | 83 | * socket up. We've got bigger problems than |
83 | * non-graceful socket closings. | 84 | * non-graceful socket closings. |
84 | */ | 85 | */ |
85 | LIMIT_NETDEBUG(KERN_INFO "DCCP: time wait bucket " | 86 | DCCP_WARN("time wait bucket table overflow\n"); |
86 | "table overflow\n"); | ||
87 | } | 87 | } |
88 | 88 | ||
89 | dccp_done(sk); | 89 | dccp_done(sk); |
@@ -96,8 +96,8 @@ struct sock *dccp_create_openreq_child(struct sock *sk, | |||
96 | /* | 96 | /* |
97 | * Step 3: Process LISTEN state | 97 | * Step 3: Process LISTEN state |
98 | * | 98 | * |
99 | * // Generate a new socket and switch to that socket | 99 | * (* Generate a new socket and switch to that socket *) |
100 | * Set S := new socket for this port pair | 100 | * Set S := new socket for this port pair |
101 | */ | 101 | */ |
102 | struct sock *newsk = inet_csk_clone(sk, req, GFP_ATOMIC); | 102 | struct sock *newsk = inet_csk_clone(sk, req, GFP_ATOMIC); |
103 | 103 | ||
@@ -146,9 +146,9 @@ out_free: | |||
146 | /* | 146 | /* |
147 | * Step 3: Process LISTEN state | 147 | * Step 3: Process LISTEN state |
148 | * | 148 | * |
149 | * Choose S.ISS (initial seqno) or set from Init Cookie | 149 | * Choose S.ISS (initial seqno) or set from Init Cookies |
150 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init | 150 | * Initialize S.GAR := S.ISS |
151 | * Cookie | 151 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init Cookies |
152 | */ | 152 | */ |
153 | 153 | ||
154 | /* See dccp_v4_conn_request */ | 154 | /* See dccp_v4_conn_request */ |
@@ -194,15 +194,17 @@ struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, | |||
194 | 194 | ||
195 | /* Check for retransmitted REQUEST */ | 195 | /* Check for retransmitted REQUEST */ |
196 | if (dccp_hdr(skb)->dccph_type == DCCP_PKT_REQUEST) { | 196 | if (dccp_hdr(skb)->dccph_type == DCCP_PKT_REQUEST) { |
197 | if (after48(DCCP_SKB_CB(skb)->dccpd_seq, | 197 | struct dccp_request_sock *dreq = dccp_rsk(req); |
198 | dccp_rsk(req)->dreq_isr)) { | ||
199 | struct dccp_request_sock *dreq = dccp_rsk(req); | ||
200 | 198 | ||
199 | if (after48(DCCP_SKB_CB(skb)->dccpd_seq, dreq->dreq_isr)) { | ||
201 | dccp_pr_debug("Retransmitted REQUEST\n"); | 200 | dccp_pr_debug("Retransmitted REQUEST\n"); |
202 | /* Send another RESPONSE packet */ | 201 | dreq->dreq_isr = DCCP_SKB_CB(skb)->dccpd_seq; |
203 | dccp_set_seqno(&dreq->dreq_iss, dreq->dreq_iss + 1); | 202 | /* |
204 | dccp_set_seqno(&dreq->dreq_isr, | 203 | * Send another RESPONSE packet |
205 | DCCP_SKB_CB(skb)->dccpd_seq); | 204 | * To protect against Request floods, increment retrans |
205 | * counter (backoff, monitored by dccp_response_timer). | ||
206 | */ | ||
207 | req->retrans++; | ||
206 | req->rsk_ops->rtx_syn_ack(sk, req, NULL); | 208 | req->rsk_ops->rtx_syn_ack(sk, req, NULL); |
207 | } | 209 | } |
208 | /* Network Duplicate, discard packet */ | 210 | /* Network Duplicate, discard packet */ |
@@ -242,7 +244,7 @@ listen_overflow: | |||
242 | DCCP_SKB_CB(skb)->dccpd_reset_code = DCCP_RESET_CODE_TOO_BUSY; | 244 | DCCP_SKB_CB(skb)->dccpd_reset_code = DCCP_RESET_CODE_TOO_BUSY; |
243 | drop: | 245 | drop: |
244 | if (dccp_hdr(skb)->dccph_type != DCCP_PKT_RESET) | 246 | if (dccp_hdr(skb)->dccph_type != DCCP_PKT_RESET) |
245 | req->rsk_ops->send_reset(skb); | 247 | req->rsk_ops->send_reset(sk, skb); |
246 | 248 | ||
247 | inet_csk_reqsk_queue_drop(sk, req, prev); | 249 | inet_csk_reqsk_queue_drop(sk, req, prev); |
248 | goto out; | 250 | goto out; |
@@ -282,3 +284,19 @@ int dccp_child_process(struct sock *parent, struct sock *child, | |||
282 | } | 284 | } |
283 | 285 | ||
284 | EXPORT_SYMBOL_GPL(dccp_child_process); | 286 | EXPORT_SYMBOL_GPL(dccp_child_process); |
287 | |||
288 | void dccp_reqsk_send_ack(struct sk_buff *skb, struct request_sock *rsk) | ||
289 | { | ||
290 | DCCP_BUG("DCCP-ACK packets are never sent in LISTEN/RESPOND state"); | ||
291 | } | ||
292 | |||
293 | EXPORT_SYMBOL_GPL(dccp_reqsk_send_ack); | ||
294 | |||
295 | void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb) | ||
296 | { | ||
297 | inet_rsk(req)->rmt_port = dccp_hdr(skb)->dccph_sport; | ||
298 | inet_rsk(req)->acked = 0; | ||
299 | req->rcv_wnd = sysctl_dccp_feat_sequence_window; | ||
300 | } | ||
301 | |||
302 | EXPORT_SYMBOL_GPL(dccp_reqsk_init); | ||