Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214757
b: refs/heads/master
c: 59104f0
h: refs/heads/master
i:
  214755: aabdf5b
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Sep 24, 2010
1 parent f5d2de7 commit 019a767
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a02cec2155fbea457eca8881870fd2de1a4c4c76
refs/heads/master: 59104f062435c7816e39ee5ed504a69cb8037f10
9 changes: 6 additions & 3 deletions trunk/net/ipv4/ip_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,16 +926,19 @@ int ip_append_data(struct sock *sk,
!(rt->dst.dev->features&NETIF_F_SG))
alloclen = mtu;
else
alloclen = datalen + fragheaderlen;
alloclen = fraglen;

/* The last fragment gets additional space at tail.
* Note, with MSG_MORE we overallocate on fragments,
* because we have no idea what fragment will be
* the last.
*/
if (datalen == length + fraggap)
if (datalen == length + fraggap) {
alloclen += rt->dst.trailer_len;

/* make sure mtu is not reached */
if (datalen > mtu - fragheaderlen - rt->dst.trailer_len)
datalen -= ALIGN(rt->dst.trailer_len, 8);
}
if (transhdrlen) {
skb = sock_alloc_send_skb(sk,
alloclen + hh_len + 15,
Expand Down

0 comments on commit 019a767

Please sign in to comment.