提交 2205a6ea 编写于 作者: J Jiri Bohac 提交者: David S. Miller

sctp: fix reporting of unknown parameters

commit 5fa782c2 re-worked the
handling of unknown parameters. sctp_init_cause_fixed() can now
return -ENOSPC if there is not enough tailroom in the error
chunk skb. When this happens, the error header is not appended to
the error chunk. In that case, the payload of the unknown parameter
should not be appended either.
Signed-off-by: NJiri Bohac <jbohac@suse.cz>
Acked-by: NVlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 226111d1
...@@ -2029,8 +2029,8 @@ static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc, ...@@ -2029,8 +2029,8 @@ static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc,
*errp = sctp_make_op_error_fixed(asoc, chunk); *errp = sctp_make_op_error_fixed(asoc, chunk);
if (*errp) { if (*errp) {
sctp_init_cause_fixed(*errp, SCTP_ERROR_UNKNOWN_PARAM, if (!sctp_init_cause_fixed(*errp, SCTP_ERROR_UNKNOWN_PARAM,
WORD_ROUND(ntohs(param.p->length))); WORD_ROUND(ntohs(param.p->length))))
sctp_addto_chunk_fixed(*errp, sctp_addto_chunk_fixed(*errp,
WORD_ROUND(ntohs(param.p->length)), WORD_ROUND(ntohs(param.p->length)),
param.v); param.v);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册