Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e93b4f03 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'sctp-add-SCTP_ECN_SUPPORTED-sockopt'



Xin Long says:

====================
sctp: add SCTP_ECN_SUPPORTED sockopt

This patchset is to make ecn flag per netns and endpoint and then
add SCTP_ECN_SUPPORTED sockopt, as does for other feature flags.
====================

Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 7add83d9 d5886b91
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -128,6 +128,9 @@ struct netns_sctp {
	/* Flag to indicate if stream interleave is enabled */
	int intl_enable;

	/* Flag to indicate if ecn is enabled */
	int ecn_enable;

	/*
	 * Policy to control SCTP IPv4 address scoping
	 * 0   - Disable IPv4 address scoping
+2 −1
Original line number Diff line number Diff line
@@ -1322,7 +1322,8 @@ struct sctp_endpoint {
	/* SCTP-AUTH: endpoint shared keys */
	struct list_head endpoint_shared_keys;
	__u16 active_key_id;
	__u8  auth_enable:1,
	__u8  ecn_enable:1,
	      auth_enable:1,
	      intl_enable:1,
	      prsctp_enable:1,
	      asconf_enable:1,
+1 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ typedef __s32 sctp_assoc_t;
#define SCTP_EVENT	127
#define SCTP_ASCONF_SUPPORTED	128
#define SCTP_AUTH_SUPPORTED	129
#define SCTP_ECN_SUPPORTED	130

/* PR-SCTP policies */
#define SCTP_PR_SCTP_NONE	0x0000
+1 −0
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
	 */
	ep->prsctp_enable = net->sctp.prsctp_enable;
	ep->reconf_enable = net->sctp.reconf_enable;
	ep->ecn_enable = net->sctp.ecn_enable;

	/* Remember who we are attached to.  */
	ep->base.sk = sk;
+3 −0
Original line number Diff line number Diff line
@@ -1254,6 +1254,9 @@ static int __net_init sctp_defaults_init(struct net *net)
	/* Disable AUTH by default. */
	net->sctp.auth_enable = 0;

	/* Enable ECN by default. */
	net->sctp.ecn_enable = 1;

	/* Set SCOPE policy to enabled */
	net->sctp.scope_policy = SCTP_SCOPE_POLICY_ENABLE;

Loading