build for linux

This commit is contained in:
Jett Chen 2023-12-17 02:15:27 +08:00
parent 5297f61f9f
commit b922bf56e3
4 changed files with 11 additions and 7 deletions

View file

@ -13,8 +13,8 @@ use fehler::throws;
use libc::in6_ifreq;
use socket2::{Domain, SockAddr, Socket, Type};
use tracing::{info, instrument};
use super::{ifname_to_string, string_to_ifname, TunOptions};
use super::{ifname_to_string, string_to_ifname};
use crate::TunOptions;
mod sys;
@ -40,10 +40,10 @@ impl TunInterface {
let mut flags = libc::IFF_TUN as i16;
if options.no_pi.is_some() {
if options.no_pi {
flags |= libc::IFF_NO_PI as i16;
}
if options.tun_excl.is_some() {
if options.tun_excl {
flags |= libc::IFF_TUN_EXCL as i16;
}