sctp: implement prsctp TTL policy
prsctp TTL policy is a policy to abandon chunks when they expire at the specific time in local stack. It's similar with expires_at in struct sctp_datamsg. This patch uses sinfo->sinfo_timetolive to set the specific time for TTL policy. sinfo->sinfo_timetolive is also used for msg->expires_at. So if prsctp_enable or TTL policy is not enabled, msg->expires_at still works as before. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
826d253d57
commit
a6c2f79287
@@ -7099,7 +7099,7 @@ static int sctp_msghdr_parse(const struct msghdr *msg, sctp_cmsgs_t *cmsgs)
|
||||
|
||||
if (cmsgs->srinfo->sinfo_flags &
|
||||
~(SCTP_UNORDERED | SCTP_ADDR_OVER |
|
||||
SCTP_SACK_IMMEDIATELY |
|
||||
SCTP_SACK_IMMEDIATELY | SCTP_PR_SCTP_MASK |
|
||||
SCTP_ABORT | SCTP_EOF))
|
||||
return -EINVAL;
|
||||
break;
|
||||
@@ -7123,7 +7123,7 @@ static int sctp_msghdr_parse(const struct msghdr *msg, sctp_cmsgs_t *cmsgs)
|
||||
|
||||
if (cmsgs->sinfo->snd_flags &
|
||||
~(SCTP_UNORDERED | SCTP_ADDR_OVER |
|
||||
SCTP_SACK_IMMEDIATELY |
|
||||
SCTP_SACK_IMMEDIATELY | SCTP_PR_SCTP_MASK |
|
||||
SCTP_ABORT | SCTP_EOF))
|
||||
return -EINVAL;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user