Merge pull request #20 from safing/feature/portscan_detection

minor general changes: debugmessages, comments, TODOs
This commit is contained in:
Dave Gson 2019-08-23 09:56:27 +00:00 committed by GitHub
commit c65d830fc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -146,6 +146,7 @@ func handlePacket(pkt packet.Packet) {
pkt.PermanentAccept()
return
}
// TODO: Howto handle NetBios?
}
// log.Debugf("firewall: pkt %s has ID %s", pkt, pkt.GetLinkID())
@ -268,6 +269,7 @@ func initialHandler(pkt packet.Packet, link *network.Link) {
// link.StopFirewallHandler()
// permanentVerdict(pkt, network.VerdictAccept)
case link.Inspect:
log.Tracer(pkt.Ctx()).Trace("firewall: start inspecting")
link.SetFirewallHandler(inspectThenVerdict)
inspectThenVerdict(pkt, link)
default:

View file

@ -64,7 +64,7 @@ func RunInspectors(pkt packet.Packet, link *network.Link) (network.Verdict, bool
continue
}
action := inspectors[key](pkt, link)
action := inspectors[key](pkt, link) // Actually run inspector
switch action {
case DO_NOTHING:
if verdict < network.VerdictAccept {

View file

@ -14,6 +14,7 @@ type Threat struct {
MitigationLevel uint8 // Recommended Security Level to switch to for mitigation
Started int64
Ended int64
// TODO: add locking
}
// AddOrUpdateThreat adds or updates a new threat in the system status.