aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
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 5db4df460049..46339f6bcd00 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)
506 /* Be promiscuous by default to maintain previous behaviour. */ 506 /* Be promiscuous by default to maintain previous behaviour. */
507 tun->if_flags = IFF_PROMISC; 507 tun->if_flags = IFF_PROMISC;
508 /* Generate random Ethernet address. */ 508 /* Generate random Ethernet address. */
509 *(u16 *)tun->dev_addr = htons(0x00FF); 509 *(__be16 *)tun->dev_addr = htons(0x00FF);
510 get_random_bytes(tun->dev_addr + sizeof(u16), 4); 510 get_random_bytes(tun->dev_addr + sizeof(u16), 4);
511 memset(tun->chr_filter, 0, sizeof tun->chr_filter); 511 memset(tun->chr_filter, 0, sizeof tun->chr_filter);
512 512