mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-31 09:44:44 +00:00
Allow "Port = 0" in [Server] blocks
Port number 0 marks remote servers that try to connect to this daemon, but where this daemon never tries to establis a connection on its own: only incoming connections are allowed.
This commit is contained in:
parent
58a4dae56d
commit
8927700b22
@ -1361,11 +1361,12 @@ Handle_SERVER( int Line, char *Var, char *Arg )
|
||||
if( strcasecmp( Var, "Port" ) == 0 ) {
|
||||
/* Port to which this server should connect */
|
||||
port = atol( Arg );
|
||||
if( port > 0 && port < 0xFFFF )
|
||||
if (port >= 0 && port < 0xFFFF)
|
||||
New_Server.port = (UINT16)port;
|
||||
else
|
||||
Config_Error( LOG_ERR, "%s, line %d (section \"Server\"): Illegal port number %ld!",
|
||||
NGIRCd_ConfFile, Line, port );
|
||||
Config_Error(LOG_ERR,
|
||||
"%s, line %d (section \"Server\"): Illegal port number %ld!",
|
||||
NGIRCd_ConfFile, Line, port );
|
||||
return;
|
||||
}
|
||||
#ifdef SSL_SUPPORT
|
||||
|
Loading…
Reference in New Issue
Block a user