]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: add SCTP_DEFAULT_PRINFO into sctp sockopt
authorXin Long <lucien.xin@gmail.com>
Sat, 9 Jul 2016 11:47:41 +0000 (19:47 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jul 2016 20:25:38 +0000 (13:25 -0700)
commit29151ce323046673890ad81358df8c30b093a7e2
tree8e039e6a62d97bedf18d27287955446d5da5b9b3
parent708000b6486c5faef3d7bc650efc8591637a14b6
sctp: add SCTP_DEFAULT_PRINFO into sctp sockopt

This patch adds SCTP_DEFAULT_PRINFO to sctp sockopt. It is used
to set/get sctp Partially Reliable Policies' default params,
which includes 3 policies (ttl, rtx, prio) and their values.

Still, if we set policy params in sndinfo, we will use the params
of sndinfo against chunks, instead of the default params.

In this patch, we will use 5-8bit of sp/asoc->default_flags
to store prsctp policies, and reuse asoc->default_timetolive
to store their values. It means if we enable and set prsctp
policy, prior ttl timeout in sctp will not work any more.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/sctp.h
net/sctp/socket.c