fix: remove netdevice crate usage

This commit is contained in:
Raphael Tomé Santana 2023-10-09 10:50:58 -03:00
parent 5383927684
commit a0b8572089
No known key found for this signature in database
GPG key ID: 8D157B0264903C19

View file

@ -196,7 +196,7 @@ fn main() {
); );
return; return;
}; };
if iface.flags & (netdevice::IFF_UP.bits() as u32) == 0 { if !iface.is_up() {
error!("specified interface is DOWN"); error!("specified interface is DOWN");
return; return;
} }
@ -286,7 +286,7 @@ fn main() {
let (mut tx, mut rx) = get_channel(masscanned.iface.unwrap()); let (mut tx, mut rx) = get_channel(masscanned.iface.unwrap());
loop { loop {
/* check if network interface is still up */ /* check if network interface is still up */
if masscanned.iface.unwrap().flags & (netdevice::IFF_UP.bits() as u32) == 0 { if !masscanned.iface.unwrap().is_up() {
error!("interface is DOWN - aborting"); error!("interface is DOWN - aborting");
break; break;
} }