Skip to content

Commit

Permalink
[FIX] Fixed too big buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
SkuldNorniern committed Feb 16, 2023
1 parent ca5fcd3 commit 9540a16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/net/online_fluereflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub async fn packet_capture(
let mut cap = Capture::from_device(interface)
.unwrap()
.promisc(true)
.buffer_size(1000000000)
//.buffer_size(1000000000)
//.immediate_mode(true)
.open()
.unwrap();
Expand Down Expand Up @@ -175,7 +175,7 @@ pub async fn packet_capture(
packet_count = 0;
for (key, flow) in active_flow.iter() {
if flow.get_last() < (time - (flow_timeout * 1000)) {
if verbose >= 1 {
if verbose >= 2 {
println!("flow expired");
}
records.push(*flow);
Expand Down
2 changes: 1 addition & 1 deletion src/net/packet_pcap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub async fn pcap_capture(
let mut cap = Capture::from_device(interface)
.unwrap()
.promisc(true)
.buffer_size(1000000000)
//.buffer_size(1000000000)
.open()
.unwrap();

Expand Down

0 comments on commit 9540a16

Please sign in to comment.