aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sctp/sctp.h7
-rw-r--r--include/net/sctp/structs.h1
2 files changed, 5 insertions, 3 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index d16a304cbed4..8a6d5297de16 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -486,15 +486,16 @@ static inline __s32 sctp_jitter(__u32 rto)
486} 486}
487 487
488/* Break down data chunks at this point. */ 488/* Break down data chunks at this point. */
489static inline int sctp_frag_point(const struct sctp_sock *sp, int pmtu) 489static inline int sctp_frag_point(const struct sctp_association *asoc, int pmtu)
490{ 490{
491 struct sctp_sock *sp = sctp_sk(asoc->base.sk);
491 int frag = pmtu; 492 int frag = pmtu;
492 493
493 frag -= sp->pf->af->net_header_len; 494 frag -= sp->pf->af->net_header_len;
494 frag -= sizeof(struct sctphdr) + sizeof(struct sctp_data_chunk); 495 frag -= sizeof(struct sctphdr) + sizeof(struct sctp_data_chunk);
495 496
496 if (sp->user_frag) 497 if (asoc->user_frag)
497 frag = min_t(int, frag, sp->user_frag); 498 frag = min_t(int, frag, asoc->user_frag);
498 499
499 frag = min_t(int, frag, SCTP_MAX_CHUNK_LEN); 500 frag = min_t(int, frag, SCTP_MAX_CHUNK_LEN);
500 501
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index df4c6321996d..b10612810f56 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1763,6 +1763,7 @@ struct sctp_association {
1763 1763
1764 /* The message size at which SCTP fragmentation will occur. */ 1764 /* The message size at which SCTP fragmentation will occur. */
1765 __u32 frag_point; 1765 __u32 frag_point;
1766 __u32 user_frag;
1766 1767
1767 /* Counter used to count INIT errors. */ 1768 /* Counter used to count INIT errors. */
1768 int init_err_counter; 1769 int init_err_counter;