diff options
author | David S. Miller <davem@davemloft.net> | 2005-07-09 00:47:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-09 00:47:49 -0400 |
commit | 79af02c2538d54ff0dcd3f43646f506207f2ee62 (patch) | |
tree | 0e77872e7ac3da31dd5d77f260a9ae391896869d /net/sctp/input.c | |
parent | 9c05989bb2264f0fa4fc95f81d2c4e6aa2eaa24d (diff) |
[SCTP]: Use struct list_head for chunk lists, not sk_buff_head.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r-- | net/sctp/input.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c index 339f7acfdb64..5e085e041a6e 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
@@ -115,6 +115,17 @@ static void sctp_rcv_set_owner_r(struct sk_buff *skb, struct sock *sk) | |||
115 | atomic_add(sizeof(struct sctp_chunk),&sk->sk_rmem_alloc); | 115 | atomic_add(sizeof(struct sctp_chunk),&sk->sk_rmem_alloc); |
116 | } | 116 | } |
117 | 117 | ||
118 | struct sctp_input_cb { | ||
119 | union { | ||
120 | struct inet_skb_parm h4; | ||
121 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | ||
122 | struct inet6_skb_parm h6; | ||
123 | #endif | ||
124 | } header; | ||
125 | struct sctp_chunk *chunk; | ||
126 | }; | ||
127 | #define SCTP_INPUT_CB(__skb) ((struct sctp_input_cb *)&((__skb)->cb[0])) | ||
128 | |||
118 | /* | 129 | /* |
119 | * This is the routine which IP calls when receiving an SCTP packet. | 130 | * This is the routine which IP calls when receiving an SCTP packet. |
120 | */ | 131 | */ |
@@ -243,6 +254,7 @@ int sctp_rcv(struct sk_buff *skb) | |||
243 | ret = -ENOMEM; | 254 | ret = -ENOMEM; |
244 | goto discard_release; | 255 | goto discard_release; |
245 | } | 256 | } |
257 | SCTP_INPUT_CB(skb)->chunk = chunk; | ||
246 | 258 | ||
247 | sctp_rcv_set_owner_r(skb,sk); | 259 | sctp_rcv_set_owner_r(skb,sk); |
248 | 260 | ||
@@ -265,9 +277,9 @@ int sctp_rcv(struct sk_buff *skb) | |||
265 | sctp_bh_lock_sock(sk); | 277 | sctp_bh_lock_sock(sk); |
266 | 278 | ||
267 | if (sock_owned_by_user(sk)) | 279 | if (sock_owned_by_user(sk)) |
268 | sk_add_backlog(sk, (struct sk_buff *) chunk); | 280 | sk_add_backlog(sk, skb); |
269 | else | 281 | else |
270 | sctp_backlog_rcv(sk, (struct sk_buff *) chunk); | 282 | sctp_backlog_rcv(sk, skb); |
271 | 283 | ||
272 | /* Release the sock and any reference counts we took in the | 284 | /* Release the sock and any reference counts we took in the |
273 | * lookup calls. | 285 | * lookup calls. |
@@ -302,14 +314,8 @@ discard_release: | |||
302 | */ | 314 | */ |
303 | int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb) | 315 | int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb) |
304 | { | 316 | { |
305 | struct sctp_chunk *chunk; | 317 | struct sctp_chunk *chunk = SCTP_INPUT_CB(skb)->chunk; |
306 | struct sctp_inq *inqueue; | 318 | struct sctp_inq *inqueue = &chunk->rcvr->inqueue; |
307 | |||
308 | /* One day chunk will live inside the skb, but for | ||
309 | * now this works. | ||
310 | */ | ||
311 | chunk = (struct sctp_chunk *) skb; | ||
312 | inqueue = &chunk->rcvr->inqueue; | ||
313 | 319 | ||
314 | sctp_inq_push(inqueue, chunk); | 320 | sctp_inq_push(inqueue, chunk); |
315 | return 0; | 321 | return 0; |