提交 4a1c0107 编写于 作者: V Vlad Yasevich 提交者: David S. Miller

[SCTP]: Fix err_hdr assignment in sctp_init_cause.

The subh->err_hdr should point to the error header, not the data.
Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: NSridhar Samudrala <sri@us.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f79e7802
...@@ -124,8 +124,8 @@ void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code, ...@@ -124,8 +124,8 @@ void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code,
padlen = len % 4; padlen = len % 4;
err.length = htons(len); err.length = htons(len);
len += padlen; len += padlen;
sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err); chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err);
chunk->subh.err_hdr = sctp_addto_chunk(chunk, paylen, payload); sctp_addto_chunk(chunk, paylen, payload);
} }
/* 3.3.2 Initiation (INIT) (1) /* 3.3.2 Initiation (INIT) (1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册