Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d9dd756 authored by Zach Brown's avatar Zach Brown Committed by David S. Miller
Browse files

[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: default avatarZach Brown <zach.brown@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 08d09997
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -904,7 +904,7 @@ int ip_append_data(struct sock *sk,
			 * because we have no idea what fragment will be
			 * the last.
			 */
			if (datalen == length)
			if (datalen == length + fraggap)
				alloclen += rt->u.dst.trailer_len;

			if (transhdrlen) {