From 6d38d4bfb497d2d66ca1027c4772737d6ea47c02 Mon Sep 17 00:00:00 2001 From: emanuele-f Date: Sun, 30 Jun 2019 19:10:51 +0200 Subject: [PATCH] Fix adapter name length in windows --- n2n.h | 6 +++++- win32/wintap.c | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/n2n.h b/n2n.h index fb4fdca..21473dd 100644 --- a/n2n.h +++ b/n2n.h @@ -126,8 +126,12 @@ typedef struct ether_hdr ether_hdr_t; #include "n2n_wire.h" #include "n2n_transforms.h" -/* N2N_IFNAMSIZ is needed on win32 even if dev_name is not used after declaration */ +#ifdef WIN32 +#define N2N_IFNAMSIZ 64 +#else #define N2N_IFNAMSIZ 16 /* 15 chars * NULL */ +#endif + #ifndef WIN32 typedef struct tuntap_dev { int fd; diff --git a/win32/wintap.c b/win32/wintap.c index 4ad91de..3321675 100644 --- a/win32/wintap.c +++ b/win32/wintap.c @@ -5,9 +5,6 @@ #include "../n2n.h" #include "n2n_win32.h" -/* 1500 bytes payload + 14 bytes ethernet header + 4 bytes VLAN tag */ -#define MTU 1518 - void initWin32() { WSADATA wsaData; int err;