aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-12-22 17:52:42 +0000
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:07:57 -0800
commita3edb08311fc559652ffc959e93eb5be9294443f (patch)
tree5e3795acaf64e34703c006a548f013ff0401e97a /drivers/net/tun.c
parent7eefb04eb0761ce220890975fe33b7c262612c0d (diff)
downloadkernel_samsung_aries-a3edb08311fc559652ffc959e93eb5be9294443f.zip
kernel_samsung_aries-a3edb08311fc559652ffc959e93eb5be9294443f.tar.gz
kernel_samsung_aries-a3edb08311fc559652ffc959e93eb5be9294443f.tar.bz2
annotate tun
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 5db4df4..46339f6 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -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);