From 98bb7ee2e7b31872802224a4eaa512353497f8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eirik=20=C3=98verby?= Date: Fri, 8 Dec 2023 18:29:21 +0100 Subject: [PATCH] Rename protocol to ProtocolName; the former is already used This change allows TCP and UDP to be correctly processed by the GELF input. --- LayerHandler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LayerHandler.go b/LayerHandler.go index d285d64..b1d61d2 100644 --- a/LayerHandler.go +++ b/LayerHandler.go @@ -65,7 +65,7 @@ func handleIPv6(event map[string]interface{}, layer gopacket.Layer) { } func handleTCP(event map[string]interface{}, layer gopacket.Layer) { - event["protocol"] = "TCP" + event["ProtocolName"] = "TCP" tcp, _ := layer.(*layers.TCP) tcpEvent := structs.Map(tcp) @@ -87,7 +87,7 @@ func handleTCP(event map[string]interface{}, layer gopacket.Layer) { } func handleUDP(event map[string]interface{}, layer gopacket.Layer) { - event["protocol"] = "UDP" + event["ProtocolName"] = "UDP" udp, _ := layer.(*layers.UDP) udpEvent := structs.Map(udp)