[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ircnowd] [PATCH]: disable disconnecting (incorrectly?) spoofed server relays

This patch fixes connection issues with ircrc (and relays with aux/trampoline) on plan 9
It's not very well tested on linked servers and might be insecure.
However, it works on basic tests
Can anyone try this?

cpu% git/diff
diff 69797845cb8bbabcf64a15e51079395db062fdf4 uncommitted
--- a/src/ngircd/parse.c
+++ b/src/ngircd/parse.c
@@ -345,17 +345,9 @@
     /* check if the client named in the prefix is expected
      * to come from that direction */
     if (Client_NextHop(c) != client) {
-        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);
-            Conn_Close(Idx, NULL, "Spoofed prefix", true);
-            *Closed = true;
-        } else {
                 "Ignoring command with spoofed prefix \"%s\" from \"%s\" (connection %d, command \"%s\")!",
                 Req->prefix, Client_ID(client), Idx, Req->command);
-        }
         return false;