mirror of
https://github.com/bettercap/bettercap
synced 2025-08-22 22:34:22 -07:00
Handle panic from type cast
This commit is contained in:
parent
9f64372273
commit
fc3e54a84c
1 changed files with 5 additions and 1 deletions
|
@ -97,7 +97,11 @@ func mainParser(pkt gopacket.Packet, verbose bool) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
ip := nlayer.(*layers.IPv4)
|
ip, ok := nlayer.(*layers.IPv4)
|
||||||
|
if !ok {
|
||||||
|
log.Debug("Could not extract network layer, skipping packet")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
tlayer := pkt.TransportLayer()
|
tlayer := pkt.TransportLayer()
|
||||||
if tlayer == nil {
|
if tlayer == nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue