Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79263
b: refs/heads/master
c: a3edb08
h: refs/heads/master
i:
  79261: f1677b5
  79259: b6403ab
  79255: bf2b593
  79247: 2f4ab4e
  79231: f1a3189
v: v3
  • Loading branch information
Al Viro authored and David S. Miller committed Jan 28, 2008
1 parent eea12b8 commit 9452601
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 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: 7eefb04eb0761ce220890975fe33b7c262612c0d
refs/heads/master: a3edb08311fc559652ffc959e93eb5be9294443f
2 changes: 1 addition & 1 deletion trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ static int tun_set_iff(struct file *file, struct ifreq *ifr)
/* Be promiscuous by default to maintain previous behaviour. */
tun->if_flags = IFF_PROMISC;
/* Generate random Ethernet address. */
*(u16 *)tun->dev_addr = htons(0x00FF);
*(__be16 *)tun->dev_addr = htons(0x00FF);
get_random_bytes(tun->dev_addr + sizeof(u16), 4);
memset(tun->chr_filter, 0, sizeof tun->chr_filter);

Expand Down
4 changes: 3 additions & 1 deletion trunk/include/linux/if_tun.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
/* Uncomment to enable debugging */
/* #define TUN_DEBUG 1 */

#include <linux/types.h>

#ifdef __KERNEL__

#ifdef TUN_DEBUG
Expand Down Expand Up @@ -88,7 +90,7 @@ struct tun_struct {

struct tun_pi {
unsigned short flags;
unsigned short proto;
__be16 proto;
};
#define TUN_PKT_STRIP 0x0001

Expand Down

0 comments on commit 9452601

Please sign in to comment.