Fix a bug that introduced while fixing a linter error

This commit is contained in:
M. Mert Yildiran 2022-05-08 14:26:08 +03:00
parent 40122f1461
commit df66231ed5
No known key found for this signature in database
GPG Key ID: D42ADB236521BF7A

View File

@ -76,7 +76,7 @@ func newTcpPacketSource(name, filename string, interfaceName string,
logger.Log.Infof("Using AF_PACKET socket as the capture source") logger.Log.Infof("Using AF_PACKET socket as the capture source")
} }
decoder := gopacket.DecodersByLayerName[string(layers.LinkTypeEthernet)] decoder := gopacket.DecodersByLayerName[layers.LinkTypeEthernet.String()]
result.Handle.SetDecoder(decoder, behaviour.Lazy, true) result.Handle.SetDecoder(decoder, behaviour.Lazy, true)
if behaviour.BpfFilter != "" { if behaviour.BpfFilter != "" {