}
}
+ /* deref prefix (referenced in queuescan) */
+ derefnode(iptree,sp->node);
freescan(sp);
/* kick the queue.. */
if (0 == ipmask_parse(cargv[0],&sin, &bits)) {
sendnoticetouser(proxyscannick,np,"Usage: scan <ip>");
} else {
+ if (bits != 128 || !irc_in_addr_is_ipv4(&sin) || irc_in_addr_is_loopback(&sin)) {
+ sendnoticetouser(proxyscannick,np,"You may only scan single IPv4 IP's");
+ return CMD_OK;
+ }
sendnoticetouser(proxyscannick,np,"Forcing scan of %s",IPtostr(sin));
// * Just queue the scans directly here.. plonk them on the priority queue * /
node = refnode(iptree, &sin, bits); /* node leaks node here - should only allow to scan a nick? */
#include "proxyscan.h"
#include "../irc/irc.h"
#include "../core/error.h"
+#include <assert.h>
pendingscan *ps_normalqueue=NULL;
pendingscan *ps_prioqueue=NULL;
* b) newnick handler - which ignores clean hosts, only scans new hosts or dirty hosts
* c) adding a new scan type (rare)
*/
+
+ /* we should never have an internal node */
+ assert(node->prefix);
+ /* reference the node - we either start a or queue a single scan */
+ patricia_ref_prefix(node->prefix);
/* If there are scans spare, just start it immediately..
* provided we're not supposed to wait */