Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88311
b: refs/heads/master
c: e01bf1c
h: refs/heads/master
i:
  88309: 498e164
  88307: 91d0654
  88303: 2edba1b
v: v3
  • Loading branch information
Rusty Russell authored and David S. Miller committed Apr 13, 2008
1 parent 2b17e7c commit efcd1de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: 14daa02139dcb3193b2b0250c0720a23ef610c49
refs/heads/master: e01bf1c83332c4653ffd30eed20a94a9c83d82b2
5 changes: 4 additions & 1 deletion trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,11 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv,
return -EFAULT;
}

if ((tun->flags & TUN_TYPE_MASK) == TUN_TAP_DEV)
if ((tun->flags & TUN_TYPE_MASK) == TUN_TAP_DEV) {
align = NET_IP_ALIGN;
if (unlikely(len < ETH_HLEN))
return -EINVAL;
}

if (!(skb = alloc_skb(len + align, GFP_KERNEL))) {
tun->dev->stats.rx_dropped++;
Expand Down

0 comments on commit efcd1de

Please sign in to comment.