Mercurial > dropbear
diff svr-main.c @ 246:f4cf0415fec1 contrib-blacklist
- blacklisting patch from Michael Deiters
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 06 Sep 2005 04:52:46 +0000 |
parents | 0cfba3034be5 |
children | c07de41b53d7 |
line wrap: on
line diff
--- a/svr-main.c Fri Jul 08 19:20:10 2005 +0000 +++ b/svr-main.c Tue Sep 06 04:52:46 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