diff --git a/src/output-lua.c b/src/output-lua.c index c929b60a56..504f176372 100644 --- a/src/output-lua.c +++ b/src/output-lua.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Open Information Security Foundation +/* Copyright (C) 2014-2020 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -196,13 +196,6 @@ static int LuaPacketLoggerAlerts(ThreadVars *tv, void *thread_data, const Packet goto not_supported; } - char proto[16] = ""; - if (SCProtoNameValid(IP_GET_IPPROTO(p)) == TRUE) { - strlcpy(proto, known_proto[IP_GET_IPPROTO(p)], sizeof(proto)); - } else { - snprintf(proto, sizeof(proto), "PROTO:%03" PRIu32, IP_GET_IPPROTO(p)); - } - /* loop through alerts stored in the packet */ SCMutexLock(&td->lua_ctx->m); uint16_t cnt; @@ -267,13 +260,6 @@ static int LuaPacketLogger(ThreadVars *tv, void *thread_data, const Packet *p) CreateTimeString(&p->ts, timebuf, sizeof(timebuf)); - char proto[16] = ""; - if (SCProtoNameValid(IP_GET_IPPROTO(p)) == TRUE) { - strlcpy(proto, known_proto[IP_GET_IPPROTO(p)], sizeof(proto)); - } else { - snprintf(proto, sizeof(proto), "PROTO:%03" PRIu32, IP_GET_IPPROTO(p)); - } - /* loop through alerts stored in the packet */ SCMutexLock(&td->lua_ctx->m); lua_getglobal(td->lua_ctx->luastate, "log");