Module: ngircd.git Branch: master Commit: 5009ab3e8c5a6fe7db5c5ad1d3fdc8aecfc64b55 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=5009a...
Author: Alexander Barton alex@barton.de Date: Tue Mar 18 16:27:03 2014 +0100
Spoofed prefixes: Really kill connection on non-server links
This fixes commit 6cbe1308 which only killed the connection when the spoofed prefix itself belonged to a non-server client.
---
src/ngircd/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c index 94230c8..28dee6f 100644 --- a/src/ngircd/parse.c +++ b/src/ngircd/parse.c @@ -342,7 +342,7 @@ Validate_Prefix( CONN_ID Idx, REQUEST *Req, bool *Closed ) /* check if the client named in the prefix is expected * to come from that direction */ if (Client_NextHop(c) != client) { - if (Client_Type(c) != CLIENT_SERVER) { + if (Client_Type(client) != CLIENT_SERVER) { Log(LOG_ERR, "Spoofed prefix "%s" from "%s" (connection %d, command "%s"), closing connection!", Req->prefix, Client_ID(client), Idx, Req->command);