mirror of
https://github.com/osmarks/ngircd.git
synced 2024-10-28 21:06:16 +00:00
Spoofed prefixes: Really kill connection on non-server links
This fixes commit6cbe1308
which only killed the connection when the spoofed prefix itself belonged to a non-server client. (cherry picked from commit5009ab3e8c
)
This commit is contained in:
parent
c0c9b1b8ac
commit
6725f67cf1
@ -345,7 +345,7 @@ Validate_Prefix( CONN_ID Idx, REQUEST *Req, bool *Closed )
|
|||||||
/* check if the client named in the prefix is expected
|
/* check if the client named in the prefix is expected
|
||||||
* to come from that direction */
|
* to come from that direction */
|
||||||
if (Client_NextHop(c) != client) {
|
if (Client_NextHop(c) != client) {
|
||||||
if (Client_Type(c) != CLIENT_SERVER) {
|
if (Client_Type(client) != CLIENT_SERVER) {
|
||||||
Log(LOG_ERR,
|
Log(LOG_ERR,
|
||||||
"Spoofed prefix \"%s\" from \"%s\" (connection %d, command \"%s\"), closing connection!",
|
"Spoofed prefix \"%s\" from \"%s\" (connection %d, command \"%s\"), closing connection!",
|
||||||
Req->prefix, Client_ID(client), Idx, Req->command);
|
Req->prefix, Client_ID(client), Idx, Req->command);
|
||||||
|
Loading…
Reference in New Issue
Block a user