Fixed in r2660 on SVN. Issue #901: http://wald.intevation.org/tracker/index.php?func=detail&aid=901&group_id=29&atid=220
Thanks for helping! s a wrote: > If I am not mistaken nessus used to package pcap with it, and the pcap > was setup to always be non-blocking. Now openvaslibraries uses the pcap > that is already installed on the system and is blocking by default. So > if you call a function that uses pcap such as Tcp_Ping() on an IP adress > that is behind a firewall or down then pcap will block forever waiting > on the first port until the plugin just times out. I believe that the > uses of pcap in openvas were intended to be non-blocking. For example > Looking at bpf_share.c, go to the function bpf_next_tv. Here you see: > > do { > p = (u_char*)pcap_next(pcaps[bpf], &head); > *caplen = head.caplen; > if ( p != NULL ) break; > gettimeofday(&now, NULL); > } while ( !((now.tv_sec > timeout.tv_sec) || > (now.tv_sec == timeout.tv_sec && now.tv_usec >= > timeout.tv_usec ) )); > > The function has built in timeout checks so that if the port has not > responded in the given time it times out, so that tcp_ping for example > can then try the next port in the list. With pcap being blocking that > call to pcap_next blocks forever. The fix is simple and just requires > calling pcap_setnonblock on the pcap device. So, the question is does > openvas require pcap to be blocking or non blocking? Settting it as > non-blocking doesnt appear to break anything. Thoughts? > > ------------------------------------------------------------------------ > Windows Liveā¢: Keep your life in sync. See how it works. > <http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_022009> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Openvas-devel mailing list > Openvas-devel@wald.intevation.org > http://lists.wald.intevation.org/mailman/listinfo/openvas-devel _______________________________________________ Openvas-devel mailing list Openvas-devel@wald.intevation.org http://lists.wald.intevation.org/mailman/listinfo/openvas-devel