mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 02:49:01 +00:00
When version detection changes the state of a port, the reason field is now updated as well (to udp-response or tcp-response as applicable). Thanks to Thomas Buchanan for the patch.
This commit is contained in:
@@ -1694,6 +1694,10 @@ static void adjustPortStateIfNeccessary(ServiceNFO *svc) {
|
||||
|
||||
if (svc->port->state == PORT_OPENFILTERED) {
|
||||
svc->target->ports.addPort(svc->portno, svc->proto, NULL, PORT_OPEN);
|
||||
if (svc->proto == IPPROTO_TCP)
|
||||
svc->target->ports.setStateReason(svc->portno, svc->proto, ER_TCPRESPONSE, 0, 0);
|
||||
if (svc->proto == IPPROTO_UDP)
|
||||
svc->target->ports.setStateReason(svc->portno, svc->proto, ER_UDPRESPONSE, 0, 0);
|
||||
|
||||
if (o.verbose || o.debugging > 1) {
|
||||
svc->target->NameIP(host, sizeof(host));
|
||||
|
||||
Reference in New Issue
Block a user