Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150735
b: refs/heads/master
c: 4909122
h: refs/heads/master
i:
  150733: 61512d4
  150731: d9c7c68
  150727: c584d22
  150719: f39150c
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jun 8, 2009
1 parent 3249bf2 commit 78cf4ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b82f08ea162edeee6c2c70c6c4321bea4763fa35
refs/heads/master: 4909122fb8350e70c347f1201256908a92058044
4 changes: 4 additions & 0 deletions trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,10 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun,
if (memcpy_fromiovecend((void *)&gso, iv, offset, sizeof(gso)))
return -EFAULT;

if ((gso.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) &&
gso.csum_start + gso.csum_offset + 2 > gso.hdr_len)
gso.hdr_len = gso.csum_start + gso.csum_offset + 2;

if (gso.hdr_len > len)
return -EINVAL;
offset += sizeof(pi);
Expand Down

0 comments on commit 78cf4ba

Please sign in to comment.