X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fconf.c;h=7ca5567d990158fba9a4835663831adf94081cce;hb=cb0d594e6184694f8563f1e3116e3aac34606a86;hp=c55aaf53a775f8945706a73305d3157ed277b623;hpb=47ca178a219d682c589b27e64ee1a4e936cc7bdc;p=ngircd-alex.git diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c index c55aaf53..7ca5567d 100644 --- a/src/ngircd/conf.c +++ b/src/ngircd/conf.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: conf.c,v 1.102 2007/11/21 12:16:36 alex Exp $"; +static char UNUSED id[] = "$Id: conf.c,v 1.103 2007/11/23 16:26:04 fw Exp $"; #include "imp.h" #include @@ -937,6 +937,14 @@ Handle_SERVER( int Line, char *Var, char *Arg ) Config_Error_TooLong( Line, Var ); return; } + if (strcasecmp(Var, "Bind") == 0) { + if (ngt_IPStrToBin(Arg, &New_Server.bind_addr)) + return; + + Config_Error(LOG_ERR, "%s, line %d (section \"Server\"): Can't parse IP address \"%s\"", + NGIRCd_ConfFile, Line, Arg); + return; + } if( strcasecmp( Var, "MyPassword" ) == 0 ) { /* Password of this server which is sent to the peer */ if (*Arg == ':') { @@ -1205,6 +1213,7 @@ Init_Server_Struct( CONF_SERVER *Server ) Resolve_Init(&Server->res_stat); Server->conn_id = NONE; + Server->bind_addr.s_addr = htonl(INADDR_ANY); } /* Init_Server_Struct */