Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3edb083 authored by Al Viro's avatar Al Viro Committed by David S. Miller
Browse files

annotate tun



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 7eefb04e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);

+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@
/* Uncomment to enable debugging */
/* #define TUN_DEBUG 1 */

#include <linux/types.h>

#ifdef __KERNEL__

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

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