This commit is contained in:
crusader 2018-10-23 12:55:26 +09:00
parent 212d3feb38
commit 5b5a780fcc

View File

@ -17,6 +17,7 @@ import (
ounc "git.loafle.net/overflow/util-go/net/cidr" ounc "git.loafle.net/overflow/util-go/net/cidr"
"git.loafle.net/overflow_scanner/probe/discovery/types" "git.loafle.net/overflow_scanner/probe/discovery/types"
"git.loafle.net/overflow_scanner/probe/internal/pcap" "git.loafle.net/overflow_scanner/probe/internal/pcap"
"github.com/google/gopacket/layers"
) )
const ( const (
@ -650,6 +651,14 @@ func (ds *ofDiscoverySession) findPort(port *omd.Port) (p *omd.Port, modified bo
modified = true modified = true
} }
if "" == p.DefaultService {
portNumber, _ := ouej.NumberToInt(port.PortNumber)
if dName, ok := layers.TCPPortNames[layers.TCPPort(portNumber)]; ok {
p.DefaultService = dName
modified = true
}
}
return return
} }