[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

problem with "conserver -M bindaddress" and proposed patch

Igor Sviridov sia@nest.org
Mon, 27 Jan 2003 21:40:55 -0800 (PST)


if "-M bindaddress" is used conserver would encounter problem under
the following circumstances:

- @servername syntax is used in conserver.cf
- gethostname differs from -M bindaddress

for example if you're running conserver on internal interface but
system default hostname points to external interface; 

if you use internal hostname (!= main) in @servername local conserver 
would be unable to match @servername to itself and assume those consoles
are remote; you can't use external name since conserver is bound to 
another interface and remote clients may not be able to connect.

the trivial fix is to override own IP with bindaddress; it's not used
anywhere else (except setting up default ACL) as far as i can tell:

patch against 7.2.4 is attached.

--- conserver/main.c.orig	Sat Oct 12 20:07:50 2002
+++ conserver/main.c	Mon Jan 27 19:29:01 2003
@@ -888,6 +888,7 @@
 	    Error("inet_addr: %s: %s", pcAddress, "invalid IP address");
+	acMyAddr.s_addr = bindAddr;
     if (fDebug) {
 	struct in_addr ba;