mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-06 02:30:57 -08:00
log the reason for fw drops (#220)
* log the reason for fw drops * only prepare log if we will end up sending it
This commit is contained in:
parent
fb252db4a1
commit
363c836422
4 changed files with 39 additions and 25 deletions
|
|
@ -280,8 +280,10 @@ func (f *Interface) decryptToTun(hostinfo *HostInfo, messageCounter uint64, out
|
|||
return
|
||||
}
|
||||
|
||||
if f.firewall.Drop(out, *fwPacket, true, hostinfo, trustedCAs) {
|
||||
dropReason := f.firewall.Drop(out, *fwPacket, true, hostinfo, trustedCAs)
|
||||
if dropReason != nil && l.Level >= logrus.DebugLevel {
|
||||
hostinfo.logger().WithField("fwPacket", fwPacket).
|
||||
WithField("reason", dropReason).
|
||||
Debugln("dropping inbound packet")
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue