From 1c6ff242296bc9a2475f282ca94708a930a781b9 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Fri, 7 Apr 2006 19:34:13 +0000 Subject: [PATCH] Fixed parsing the nodelist with dotted IP quads behind a flag --- ChangeLog | 4 +++- lib/nodelist.c | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79a9121e..5f68080e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,9 @@ $Id$ v0.83.18 01-Apr-2006 - Seems a good time to prepare for a stable release. + mbselib.a: + Fixed parsing the nodelist when IBN:1.2.3.4 returned the IP + address 1.2.3.4 with port 1. v0.83.17 27-Mar-2006 - 01-Apr-2006 diff --git a/lib/nodelist.c b/lib/nodelist.c index e00e75f9..a657e261 100644 --- a/lib/nodelist.c +++ b/lib/nodelist.c @@ -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);