tls-log: fix so buffer is reset on custom logging

Move MemBufferReset() so it also works when using custom tls
logging. This avoids duplicate tls log entries.

Bug #3177
pull/4236/head
Mats Klepsland 7 years ago committed by Victor Julien
parent af4f816204
commit 85536e8918

@ -451,12 +451,12 @@ static int LogTlsLogger(ThreadVars *tv, void *thread_data, const Packet *p,
return 0;
}
MemBufferReset(aft->buffer);
/* Custom format */
if (hlog->flags & LOG_TLS_CUSTOM) {
LogTlsLogCustom(aft, ssl_state, &p->ts, srcip, sp, dstip, dp);
} else {
MemBufferReset(aft->buffer);
CreateTimeString(&p->ts, timebuf, sizeof(timebuf));
MemBufferWriteString(aft->buffer,
"%s %s:%d -> %s:%d TLS:",

Loading…
Cancel
Save