Skip to content

Commit

Permalink
[PATCH] ip_output: account for fraggap when checking to add trailer_len
Browse files Browse the repository at this point in the history
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: Zach Brown <zach.brown@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Zach Brown authored and David S. Miller committed Apr 14, 2006
1 parent 08d0999 commit 3d9dd75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/ip_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3d9dd75

Please sign in to comment.