X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fparse.c;h=be3c864dc26f0683e5d39a6a6254ba4f84bdeab8;hb=2b95c69ea19c6711bb98ee048ee71cee94c5dde9;hp=72e3430998b301d4011b9b55175e1a91d41875a6;hpb=d99edb7728e058a889e4734f8592f495effa5bc3;p=ngircd-alex.git diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c index 72e34309..be3c864d 100644 --- a/src/ngircd/parse.c +++ b/src/ngircd/parse.c @@ -325,13 +325,21 @@ 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) { - Log(LOG_ERR, - "Spoofed prefix \"%s\" from \"%s\" (connection %d, command \"%s\")!", - Req->prefix, Client_Mask(Conn_GetClient(Idx)), Idx, - Req->command); - Conn_Close(Idx, NULL, "Spoofed prefix", true); - *Closed = true; + if (Client_Type(c) != CLIENT_SERVER) { + Log(LOG_ERR, + "Spoofed prefix \"%s\" from \"%s\" (connection %d, command \"%s\")!", + Req->prefix, Client_Mask(Conn_GetClient(Idx)), Idx, + Req->command); + Conn_Close(Idx, NULL, "Spoofed prefix", true); + *Closed = true; + } else { + Log(LOG_INFO, + "Ignoring spoofed prefix \"%s\" from \"%s\" (connection %d, command \"%s\").", + Req->prefix, Client_Mask(Conn_GetClient(Idx)), Idx, + Req->command); + } return false; + } return true;