]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/parse.c
Spoofed prefixes: Really kill connection on non-server links
[ngircd-alex.git] / src / ngircd / parse.c
index 28c198fde421e5c0f9e3cedd98fe4ce0dfe4f939..28dee6fc90c374a6d087ce0a3190b7dc94be2c99 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -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);