Nmap Development mailing list archives

Nmap loops with "Unable to find listening socket in get_rpc_results" error [2]


From: Lionel Cons <lionel.cons () cern ch>
Date: Mon, 19 Oct 2009 16:37:39 +0200

Hello,

I still suffer from the problem described two weeks ago on this list
(see http://seclists.org/nmap-dev/2009/q4/24).

Looking more closely at the code (get_rpc_results() from nmap_rpc.cc),
I noticed a strange asymmetry:

 if (udp_rpc_socket >= 0 && rsi->rpc_current_port->proto == IPPROTO_UDP) {
   FD_SET(udp_rpc_socket, &fds_r);
   max_sd = udp_rpc_socket;
 }
 else if (tcp_rpc_socket >= 0 && rsi->rpc_current_port->proto == IPPROTO_TCP) {
   FD_SET(tcp_rpc_socket, &fds_r);
   if (tcp_rpc_socket > max_sd)
     max_sd = tcp_rpc_socket;
 } else {
   error("Unable to find listening socket in %s", __func__);
   return;
 }

Why not having "if (udp_rpc_socket > max_sd) max_sd = udp_rpc_socket;"?

Anyway, this does not seem to be linked to my problem...

When Nmap loops, get_rpc_results() is called with:
 - udp_rpc_socket = -1
 - tcp_rpc_socket = 4
 - rsi->rpc_current_port->proto = IPPROTO_UDP

Any idea on what could cause this mismatch?

Cheers,

Lionel
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: