aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/ulpqueue.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-08-06 04:47:55 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-15 02:30:36 -0400
commitb01a24078fa3fc4f0f447d1306ce5adc495ead86 (patch)
tree6949f590c81e2c1ce193b1bdaec68a60e9842879 /net/sctp/ulpqueue.c
parentbb2db45b5495455ec7580315029184550709f4a2 (diff)
sctp: Make the mib per network namespace
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Vlad Yasevich <vyasevich@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/ulpqueue.c')
-rw-r--r--net/sctp/ulpqueue.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index f5a6a4f4faf7..360d8697b95c 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -326,7 +326,9 @@ static void sctp_ulpq_store_reasm(struct sctp_ulpq *ulpq,
326 * payload was fragmented on the way and ip had to reassemble them. 326 * payload was fragmented on the way and ip had to reassemble them.
327 * We add the rest of skb's to the first skb's fraglist. 327 * We add the rest of skb's to the first skb's fraglist.
328 */ 328 */
329static struct sctp_ulpevent *sctp_make_reassembled_event(struct sk_buff_head *queue, struct sk_buff *f_frag, struct sk_buff *l_frag) 329static struct sctp_ulpevent *sctp_make_reassembled_event(struct net *net,
330 struct sk_buff_head *queue, struct sk_buff *f_frag,
331 struct sk_buff *l_frag)
330{ 332{
331 struct sk_buff *pos; 333 struct sk_buff *pos;
332 struct sk_buff *new = NULL; 334 struct sk_buff *new = NULL;
@@ -394,7 +396,7 @@ static struct sctp_ulpevent *sctp_make_reassembled_event(struct sk_buff_head *qu
394 } 396 }
395 397
396 event = sctp_skb2event(f_frag); 398 event = sctp_skb2event(f_frag);
397 SCTP_INC_STATS(SCTP_MIB_REASMUSRMSGS); 399 SCTP_INC_STATS(net, SCTP_MIB_REASMUSRMSGS);
398 400
399 return event; 401 return event;
400} 402}
@@ -493,7 +495,8 @@ static struct sctp_ulpevent *sctp_ulpq_retrieve_reassembled(struct sctp_ulpq *ul
493 cevent = sctp_skb2event(pd_first); 495 cevent = sctp_skb2event(pd_first);
494 pd_point = sctp_sk(asoc->base.sk)->pd_point; 496 pd_point = sctp_sk(asoc->base.sk)->pd_point;
495 if (pd_point && pd_point <= pd_len) { 497 if (pd_point && pd_point <= pd_len) {
496 retval = sctp_make_reassembled_event(&ulpq->reasm, 498 retval = sctp_make_reassembled_event(sock_net(asoc->base.sk),
499 &ulpq->reasm,
497 pd_first, 500 pd_first,
498 pd_last); 501 pd_last);
499 if (retval) 502 if (retval)
@@ -503,7 +506,8 @@ static struct sctp_ulpevent *sctp_ulpq_retrieve_reassembled(struct sctp_ulpq *ul
503done: 506done:
504 return retval; 507 return retval;
505found: 508found:
506 retval = sctp_make_reassembled_event(&ulpq->reasm, first_frag, pos); 509 retval = sctp_make_reassembled_event(sock_net(ulpq->asoc->base.sk),
510 &ulpq->reasm, first_frag, pos);
507 if (retval) 511 if (retval)
508 retval->msg_flags |= MSG_EOR; 512 retval->msg_flags |= MSG_EOR;
509 goto done; 513 goto done;
@@ -563,7 +567,8 @@ static struct sctp_ulpevent *sctp_ulpq_retrieve_partial(struct sctp_ulpq *ulpq)
563 * further. 567 * further.
564 */ 568 */
565done: 569done:
566 retval = sctp_make_reassembled_event(&ulpq->reasm, first_frag, last_frag); 570 retval = sctp_make_reassembled_event(sock_net(ulpq->asoc->base.sk),
571 &ulpq->reasm, first_frag, last_frag);
567 if (retval && is_last) 572 if (retval && is_last)
568 retval->msg_flags |= MSG_EOR; 573 retval->msg_flags |= MSG_EOR;
569 574
@@ -655,7 +660,8 @@ static struct sctp_ulpevent *sctp_ulpq_retrieve_first(struct sctp_ulpq *ulpq)
655 * further. 660 * further.
656 */ 661 */
657done: 662done:
658 retval = sctp_make_reassembled_event(&ulpq->reasm, first_frag, last_frag); 663 retval = sctp_make_reassembled_event(sock_net(ulpq->asoc->base.sk),
664 &ulpq->reasm, first_frag, last_frag);
659 return retval; 665 return retval;
660} 666}
661 667