summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2016-07-09 13:47:40 +0200
committerDavid S. Miller <davem@davemloft.net>2016-07-11 22:25:38 +0200
commit28aa4c26fce2202db8d42ae76b639ca1d9a23d25 (patch)
tree821624ddb932078c84235eb5b852e282891dbbf6 /include
parentRevert "net: ethernet: bcmgenet: use phy_ethtool_{get|set}_link_ksettings" (diff)
downloadlinux-28aa4c26fce2202db8d42ae76b639ca1d9a23d25.tar.xz
linux-28aa4c26fce2202db8d42ae76b639ca1d9a23d25.zip
sctp: add SCTP_PR_SUPPORTED on sctp sockopt
According to section 4.5 of rfc7496, prsctp_enable should be per asoc. We will add prsctp_enable to both asoc and ep, and replace the places where it used net.sctp->prsctp_enable with asoc->prsctp_enable. ep->prsctp_enable will be initialized with net.sctp->prsctp_enable, and asoc->prsctp_enable will be initialized with ep->prsctp_enable. We can also modify it's value through sockopt SCTP_PR_SUPPORTED. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sctp/structs.h6
-rw-r--r--include/uapi/linux/sctp.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 83c5ec58b93a..07115ca9de4d 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1256,7 +1256,8 @@ struct sctp_endpoint {
/* SCTP-AUTH: endpoint shared keys */
struct list_head endpoint_shared_keys;
__u16 active_key_id;
- __u8 auth_enable;
+ __u8 auth_enable:1,
+ prsctp_enable:1;
};
/* Recover the outter endpoint structure. */
@@ -1848,7 +1849,8 @@ struct sctp_association {
__u16 active_key_id;
__u8 need_ecne:1, /* Need to send an ECNE Chunk? */
- temp:1; /* Is it a temporary association? */
+ temp:1, /* Is it a temporary association? */
+ prsctp_enable:1;
struct sctp_priv_assoc_stats stats;
};
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index ce70fe6b45df..aa08906f292d 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -112,6 +112,7 @@ typedef __s32 sctp_assoc_t;
#define SCTP_SOCKOPT_CONNECTX 110 /* CONNECTX requests. */
#define SCTP_SOCKOPT_CONNECTX3 111 /* CONNECTX requests (updated) */
#define SCTP_GET_ASSOC_STATS 112 /* Read only */
+#define SCTP_PR_SUPPORTED 113
/* These are bit fields for msghdr->msg_flags. See section 5.1. */
/* On user space Linux, these live in <bits/socket.h> as an enum. */