comparison 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
comparison
equal deleted inserted replaced
245:b24730e11c83 247:c07de41b53d7
26 #include "dbutil.h" 26 #include "dbutil.h"
27 #include "session.h" 27 #include "session.h"
28 #include "buffer.h" 28 #include "buffer.h"
29 #include "signkey.h" 29 #include "signkey.h"
30 #include "runopts.h" 30 #include "runopts.h"
31 #include "blacklist.h"
31 32
32 static int listensockets(int *sock, int sockcount, int *maxfd); 33 static int listensockets(int *sock, int sockcount, int *maxfd);
33 static void sigchld_handler(int dummy); 34 static void sigchld_handler(int dummy);
34 static void sigsegv_handler(int); 35 static void sigsegv_handler(int);
35 static void sigintterm_handler(int fish); 36 static void sigintterm_handler(int fish);
236 if (childpipes[j] < 0) { 237 if (childpipes[j] < 0) {
237 break; 238 break;
238 } 239 }
239 } 240 }
240 241
242 if (is_blacklisted(getaddrstring(&remoteaddr, 0)) == 1) {
243 close(childsock);
244 continue;
245 }
246
241 if (j == MAX_UNAUTH_CLIENTS) { 247 if (j == MAX_UNAUTH_CLIENTS) {
242 /* no free connections */ 248 /* no free connections */
243 /* TODO - possibly log, though this would be an easy way 249 /* TODO - possibly log, though this would be an easy way
244 * to fill logs/disk */ 250 * to fill logs/disk */
245 close(childsock); 251 close(childsock);