Fix linux compilation & narrowing conversion warning

This commit is contained in:
Jason Rhinelander 2021-03-02 15:26:39 -04:00
parent e198bfd3e1
commit 096f37fe4e
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
#include <sys/types.h>
#include <fcntl.h>
#include <vpn/common.hpp>
#include <linux/if.h>
#include <linux/if_tun.h>
namespace llarp::vpn
@ -68,7 +69,7 @@ namespace llarp::vpn
control6.ioctl(SIOCSIFADDR, &ifr6);
}
}
ifr.ifr_flags = flags | IFF_UP | IFF_NO_PI;
ifr.ifr_flags = static_cast<short>(flags | IFF_UP | IFF_NO_PI);
control.ioctl(SIOCSIFFLAGS, &ifr);
}