From e8ea6cb447f750bbd841137d29119b126f879d99 Mon Sep 17 00:00:00 2001 From: Jean-Louis Huynen Date: Mon, 11 Mar 2019 10:18:25 +0100 Subject: [PATCH] Fix #12 --- d4-tlsf.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/d4-tlsf.go b/d4-tlsf.go index 4f256af..6d6087a 100644 --- a/d4-tlsf.go +++ b/d4-tlsf.go @@ -47,12 +47,16 @@ var outCerts = flag.String("w", "", "Folder to write certificates into") var outJSON = flag.String("j", "", "Folder to write certificates into, stdin if not set") var jobQ chan d4tls.TLSSession +// memory +var bufferedPagesPerConnection = flag.Int("mbpc", 16, "Max Buffered Pages per Connection.") +var bufferedPagesTotal = flag.Int("mbpt", 1024, "Max Total Buffered Pages.") + const closeTimeout time.Duration = time.Hour * 24 // Closing inactive: TODO: from CLI const timeout time.Duration = time.Minute * 5 // Pending bytes: TODO: from CLI var assemblerOptions = reassembly.AssemblerOptions{ - MaxBufferedPagesPerConnection: 16, - MaxBufferedPagesTotal: 0, // unlimited + MaxBufferedPagesPerConnection: *bufferedPagesPerConnection, + MaxBufferedPagesTotal: *bufferedPagesTotal, // unlimited } var outputLevel int