Fixed parsing the nodelist with dotted IP quads behind a flag

This commit is contained in:
Michiel Broek
2006-04-07 19:34:13 +00:00
parent 11492ba908
commit 1c6ff24229
2 changed files with 9 additions and 3 deletions

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Read nodelists information
*
*****************************************************************************
* Copyright (C) 1997-2005
* Copyright (C) 1997-2006
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -869,7 +869,11 @@ node *getnlent(faddr *addr)
*r++;
for (tmps = &nl_service; *tmps; tmps=&((*tmps)->next)) {
if (strncmp(p, (*tmps)->flag, 3) == 0) {
if (atoi(r)) {
/*
* Check for format IBN:70.66.52.252 because this is not
* a port number but a dotted IP quad with default port number.
*/
if ((strchr(r, '.') == NULL) && atoi(r)) {
(*tmps)->tmpport = atoi(r);
Syslog('n', "getnlent: port override %s %d to %d",
(*tmpm)->name, (*tmps)->defport, (*tmps)->tmpport);