Feature/kext default action drop (#1747)

* [windows_kext] Make default action to drop

* [windows_kext] Minor improvments
This commit is contained in:
Vladimir Stoilov
2024-11-25 14:03:35 +02:00
parent 590fe74610
commit f35256c025
5 changed files with 18 additions and 10 deletions

View File

@@ -105,6 +105,9 @@ pub fn ale_layer_connect_v6(data: CalloutData) {
}
fn ale_layer_auth(mut data: CalloutData, ale_data: AleLayerData) {
// Make the default path as drop.
data.block_and_absorb();
let Some(device) = crate::entry::get_device() else {
return;
};

View File

@@ -110,9 +110,12 @@ fn ip_packet_layer(
interface_index: u32,
sub_interface_index: u32,
) {
// Make the default path as drop.
data.block_and_absorb();
// Block all fragment data. No easy way to keep track of the origin and they are rarely used.
if data.is_fragment_data() {
data.action_block();
data.block_and_absorb();
crate::err!("blocked fragment packet");
return;
}
@@ -147,7 +150,7 @@ fn ip_packet_layer(
} {
Ok(key) => key,
Err(err) => {
crate::dbg!("failed to get key from nbl: {}", err);
crate::err!("failed to get key from nbl: {}", err);
return;
}
};