diff options
| author | Zach Brown <zach.brown@oracle.com> | 2006-04-14 19:04:18 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2006-04-14 19:04:18 -0400 |
| commit | 3d9dd7564d5d7c28eb87b14c13a23806484667f3 (patch) | |
| tree | 3e491b16332bbd92c0c017a0d8d1f024226a3467 | |
| parent | 08d099974a09faf4cb11ffc46da87073fa132fc0 (diff) | |
[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: Zach Brown <zach.brown@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/ipv4/ip_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 8dcba3887f04..cff9c3a72daf 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
| @@ -904,7 +904,7 @@ alloc_new_skb: | |||
| 904 | * because we have no idea what fragment will be | 904 | * because we have no idea what fragment will be |
| 905 | * the last. | 905 | * the last. |
| 906 | */ | 906 | */ |
| 907 | if (datalen == length) | 907 | if (datalen == length + fraggap) |
| 908 | alloclen += rt->u.dst.trailer_len; | 908 | alloclen += rt->u.dst.trailer_len; |
| 909 | 909 | ||
| 910 | if (transhdrlen) { | 910 | if (transhdrlen) { |
