提交 3d9dd756 编写于 作者: Z Zach Brown 提交者: David S. Miller

[PATCH] ip_output: account for fraggap when checking to add trailer_len

During other work I noticed that ip_append_data() seemed to be forgetting to
include the frag gap in its calculation of a fragment that consumes the rest of
the payload.  Herbert confirmed that this was a bug that snuck in during a
previous rework.
Signed-off-by: NZach Brown <zach.brown@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 08d09997
...@@ -904,7 +904,7 @@ int ip_append_data(struct sock *sk, ...@@ -904,7 +904,7 @@ int ip_append_data(struct sock *sk,
* because we have no idea what fragment will be * because we have no idea what fragment will be
* the last. * the last.
*/ */
if (datalen == length) if (datalen == length + fraggap)
alloclen += rt->u.dst.trailer_len; alloclen += rt->u.dst.trailer_len;
if (transhdrlen) { if (transhdrlen) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册