]> jfr.im git - irc/quakenet/newserv.git/blobdiff - proxyscan/proxyscan.c
merge
[irc/quakenet/newserv.git] / proxyscan / proxyscan.c
index b8195327a5d2d3cefcff61e5d442dc0557eaab15..8e2190a77480969db9d3cb91805b9962885a82cf 100644 (file)
@@ -572,6 +572,8 @@ void killsock(scan *sp, int outcome) {
     }
   }
 
+  /* deref prefix (referenced in queuescan) */
+  derefnode(iptree,sp->node);
   freescan(sp);
 
   /* kick the queue.. */
@@ -981,6 +983,11 @@ int proxyscandoscan(void *sender, int cargc, char **cargv) {
   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;
+    }
+
     time_t t;
     sendnoticetouser(proxyscannick,np,"Forcing scan of %s",IPtostr(sin));
     // * Just queue the scans directly here.. plonk them on the priority queue * /