aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/sctp.h
diff options
context:
space:
mode:
authorRichard Haines <richard_c_haines@btinternet.com>2018-02-24 16:18:51 +0000
committerPaul Moore <paul@paul-moore.com>2018-02-26 17:43:54 -0500
commitb7e10c25b839c0c7579b2b402afc9883c107e09f (patch)
treeff919f7f54cb047461fcb747649f77c8e1de539e /include/net/sctp/sctp.h
parentsecurity: Add support for SCTP security hooks (diff)
downloadlinux-dev-b7e10c25b839c0c7579b2b402afc9883c107e09f.tar.xz
linux-dev-b7e10c25b839c0c7579b2b402afc9883c107e09f.zip
sctp: Add ip option support
Add ip option support to allow LSM security modules to utilise CIPSO/IPv4 and CALIPSO/IPv6 services. Signed-off-by: Richard Haines <richard_c_haines@btinternet.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to '')
-rw-r--r--include/net/sctp/sctp.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index f7ae6b0a21d0..25c5c8768818 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -441,9 +441,11 @@ static inline int sctp_list_single_entry(struct list_head *head)
static inline int sctp_frag_point(const struct sctp_association *asoc, int pmtu)
{
struct sctp_sock *sp = sctp_sk(asoc->base.sk);
+ struct sctp_af *af = sp->pf->af;
int frag = pmtu;
- frag -= sp->pf->af->net_header_len;
+ frag -= af->ip_options_len(asoc->base.sk);
+ frag -= af->net_header_len;
frag -= sizeof(struct sctphdr) + sctp_datachk_len(&asoc->stream);
if (asoc->user_frag)