diff svr-main.c @ 247:c07de41b53d7 contrib-blacklist

propagate from branch 'au.asn.ucc.matt.dropbear' (head c9347a030ac9ef5454b7a84f4915e91dc44efd6c) to branch 'au.asn.ucc.matt.dropbear.contrib.blacklist' (head 8662c7148e4b738e2511a6fce9a4cbd959ecb6b8)
author Matt Johnston <matt@ucc.asn.au>
date Tue, 06 Sep 2005 04:57:14 +0000
parents c5d3ef11155f f4cf0415fec1
children 9d110777f345
line wrap: on
line diff
--- a/svr-main.c	Tue Sep 06 04:04:51 2005 +0000
+++ b/svr-main.c	Tue Sep 06 04:57:14 2005 +0000
@@ -28,6 +28,7 @@
 #include "buffer.h"
 #include "signkey.h"
 #include "runopts.h"
+#include "blacklist.h"
 
 static int listensockets(int *sock, int sockcount, int *maxfd);
 static void sigchld_handler(int dummy);
@@ -238,6 +239,11 @@
 				}
 			}
 
+			if (is_blacklisted(getaddrstring(&remoteaddr, 0)) == 1) {
+				close(childsock);
+				continue;
+			}
+
 			if (j == MAX_UNAUTH_CLIENTS) {
 				/* no free connections */
 				/* TODO - possibly log, though this would be an easy way