commit 6725f67cf15a79204f2e98ba02b8299382e44e2e from: Alexander Barton date: Wed Mar 19 01:31:06 2014 UTC 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. (cherry picked from commit 5009ab3e8c5a6fe7db5c5ad1d3fdc8aecfc64b55) commit - c0c9b1b8ac45a6c048ba0605af020fb489ea8a2a commit + 6725f67cf15a79204f2e98ba02b8299382e44e2e blob - 2c7ba94d5a1e793cf37b25d8c25f3e36185c96d4 blob + ba4d8f5b3a434b3382887a5b6bf71217b41e9766 --- src/ngircd/parse.c +++ src/ngircd/parse.c @@ -345,7 +345,7 @@ Validate_Prefix( CONN_ID Idx, REQUEST *Req, bool *Clos /* 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);