aboutsummaryrefslogtreecommitdiff
path: root/include/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp')
-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 d16a304cbed..8a6d5297de1 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -486,15 +486,16 @@ static inline __s32 sctp_jitter(__u32 rto)
}
/* Break down data chunks at this point. */
-static inline int sctp_frag_point(const struct sctp_sock *sp, int pmtu)
+static inline int sctp_frag_point(const struct sctp_association *asoc, int pmtu)
{
+ struct sctp_sock *sp = sctp_sk(asoc->base.sk);
int frag = pmtu;
frag -= sp->pf->af->net_header_len;
frag -= sizeof(struct sctphdr) + sizeof(struct sctp_data_chunk);
- if (sp->user_frag)
- frag = min_t(int, frag, sp->user_frag);
+ if (asoc->user_frag)
+ frag = min_t(int, frag, asoc->user_frag);
frag = min_t(int, frag, SCTP_MAX_CHUNK_LEN);
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index df4c6321996..b10612810f5 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1763,6 +1763,7 @@ struct sctp_association {
/* The message size at which SCTP fragmentation will occur. */
__u32 frag_point;
+ __u32 user_frag;
/* Counter used to count INIT errors. */
int init_err_counter;