Browse Source

[IPV4]: Add missing skb->truesize increment in ip_append_page().

And as noted by Takahiro Yasui, we thus need to bump the
sk->sk_wmem_alloc at this spot as well.

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 17 years ago
parent
commit
1e34a11d55
1 changed files with 2 additions and 0 deletions
  1. 2 0
      net/ipv4/ip_output.c

+ 2 - 0
net/ipv4/ip_output.c

@@ -1172,6 +1172,8 @@ ssize_t	ip_append_page(struct sock *sk, struct page *page,
 
 		skb->len += len;
 		skb->data_len += len;
+		skb->truesize += len;
+		atomic_add(len, &sk->sk_wmem_alloc);
 		offset += len;
 		size -= len;
 	}