commit ed6c042475b03d8cd5606c7969092438c6f89f79 parent 8ecf2c1aed7ec5a79b161e2e2c482f3ab002e273 Author: finwo <finwo@pm.me> Date: Sat, 3 Jan 2026 19:33:24 +0100 1.55 Diffstat:
127 files changed, 406 insertions(+), 282 deletions(-)
diff --git a/ChangeLog b/ChangeLog @@ -1,6 +1,13 @@ ChangeLog for Crossroads ------------------------------------------------------------------------------ +1.55 [KK 2007-08-16] + - Changed error handling of the finding of duplicate ports. Same + ports in different service statements are now an error only if + one or both services don't list a bindto address (or if the two + listed bindto addresses are the same). Thanks, Rodd Johnson, + for finding this bug. + 1.54 [KK 2007-07-30] - Changed copyright to GPL V3. diff --git a/doc/crossroads.conf.7 b/doc/crossroads.conf.7 @@ -209,6 +209,10 @@ statements\&. Each statement must end with a semicolon, except for the The \f(CWport\fP statement defines to which TCP port a service \&'listens\&'\&. E\&.g\&. \f(CWport 8000\fP says that this service will accept connections on port 8000\&. +.IP +Multiple services in one configuration cannot use the same port +number, unless they both bind to specific (and different) IP +addresses\&. See also the \f(CWbindto\fP statement\&. .IP "Syntax:" \f(CWport\fP \fInumber\fP .IP "Default:" diff --git a/doc/crossroads.html b/doc/crossroads.html @@ -1,12 +1,12 @@ <a name="../crossroads-defs"></a><a name="defs"></a><html><head> -<title>Crossroads 1.54</title> +<title>Crossroads 1.55</title> <link rel="stylesheet" type="text/css" href="http://www.e-tunity.com/css/yodl.css"> <link rel="stylesheet" type="text/css" href="http://www.e-tunity.com/css/yodl.css"> <link rev="made" href="mailto:info@e-tunity.com"> </head> <body> <hr> -<h1>Crossroads 1.54</h1> +<h1>Crossroads 1.55</h1> <h2>Karel Kubat <br> Maintained by Karel Kubat (karel@kubat.nl)</h2> @@ -904,6 +904,10 @@ statements. Each statement must end with a semicolon, except for the <p><dt><strong>Description:</strong><dd> The <code>port</code> statement defines to which TCP port a service 'listens'. E.g. <code>port 8000</code> says that this service will accept connections on port 8000. +<p> +Multiple services in one configuration cannot use the same port + number, unless they both bind to specific (and different) IP + addresses. See also the <code>bindto</code> statement. <p><dt><strong>Syntax:</strong><dd> <code>port</code> <em>number</em> <p><dt><strong>Default:</strong><dd> There is no default. This is a required setting. </dl> diff --git a/doc/crossroads.pdf b/doc/crossroads.pdf Binary files differ. diff --git a/doc/main/conf/port.yo b/doc/main/conf/port.yo @@ -1,7 +1,11 @@ conf(port - Specifying the listen port) (The tt(port) statement defines to which TCP port a service 'listens'. E.g. tt(port 8000) says that this service will accept - connections on port 8000.) + connections on port 8000. + + Multiple services in one configuration cannot use the same port + number, unless they both bind to specific (and different) IP + addresses. See also the tt(bindto) statement.) (tt(port) em(number)) (There is no default. This is a required setting.) - -\ No newline at end of file + diff --git a/etc/Makefile.def b/etc/Makefile.def @@ -6,7 +6,7 @@ # Versioning. This defines the overall version ID and must match the topmost # entry in the ChangeLog. -VER = 1.54 +VER = 1.55 # Years that Crossroads has been 'round. YEARS = 2005-2007 diff --git a/etc/svnrev.txt b/etc/svnrev.txt @@ -1 +1 @@ -190 +191 diff --git a/src/crossroads-daemon/main.c b/src/crossroads-daemon/main.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/crossroads.h b/src/crossroads.h @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/crossroads/main.c b/src/crossroads/main.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/allocreporter.c b/src/lib/allocreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ansistamp.c b/src/lib/ansistamp.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/backendavailable.c b/src/lib/backendavailable.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/backendconnect.c b/src/lib/backendconnect.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/backendcount.c b/src/lib/backendcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/choosebackend.c b/src/lib/choosebackend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/configread.c b/src/lib/configread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/configtest.c b/src/lib/configtest.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/configwrite.c b/src/lib/configwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/copysockets.c b/src/lib/copysockets.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/createcommandlinespace.c b/src/lib/createcommandlinespace.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/data.c b/src/lib/data.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/deallocreporter.c b/src/lib/deallocreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/decrclientcount.c b/src/lib/decrclientcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/dns.c b/src/lib/dns.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/error.c b/src/lib/error.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/forktcpservicer.c b/src/lib/forktcpservicer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/hashpjw.c b/src/lib/hashpjw.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpcopy.c b/src/lib/httpcopy.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httperror.c b/src/lib/httperror.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderaddheader.c b/src/lib/httpheaderaddheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderappendheader.c b/src/lib/httpheaderappendheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderconnectiontype.c b/src/lib/httpheaderconnectiontype.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderfree.c b/src/lib/httpheaderfree.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderhascookie.c b/src/lib/httpheaderhascookie.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderhttpver.c b/src/lib/httpheaderhttpver.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheadernew.c b/src/lib/httpheadernew.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderread.c b/src/lib/httpheaderread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderremoveheader.c b/src/lib/httpheaderremoveheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheadersetheader.c b/src/lib/httpheadersetheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderval.c b/src/lib/httpheaderval.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderwrite.c b/src/lib/httpheaderwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpinsertheader.c b/src/lib/httpinsertheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpserve.c b/src/lib/httpserve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpserversocket.c b/src/lib/httpserversocket.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpwrite.c b/src/lib/httpwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/incrclientcount.c b/src/lib/incrclientcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/initsockaddr.c b/src/lib/initsockaddr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/interrupt.c b/src/lib/interrupt.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfaddallow.c b/src/lib/ipfaddallow.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfadddeny.c b/src/lib/ipfadddeny.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfallowed.c b/src/lib/ipfallowed.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfdenied.c b/src/lib/ipfdenied.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfloadfile.c b/src/lib/ipfloadfile.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfmatch.c b/src/lib/ipfmatch.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfparse.c b/src/lib/ipfparse.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ishexdigit.c b/src/lib/ishexdigit.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/isspace.c b/src/lib/isspace.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/lexer.c b/src/lib/lexer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/lockreporter.c b/src/lib/lockreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivityany.c b/src/lib/logactivityany.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivitycontinuation.c b/src/lib/logactivitycontinuation.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivityend.c b/src/lib/logactivityend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivitystart.c b/src/lib/logactivitystart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/makesocket.c b/src/lib/makesocket.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -36,7 +36,7 @@ int make_socket (int port, char const *ipaddr) { name.sin_port = htons (port); /* Propagate 'bindto' if given. */ - if (strcasecmp (ipaddr, "any")) { + if (ipaddr && *ipaddr) { msg ("Service %s: creating socket for IP address '%s'", activeservice->name, ipaddr); if ( (name.sin_addr.s_addr = inet_addr (ipaddr)) == INADDR_NONE ) { diff --git a/src/lib/markactivity.c b/src/lib/markactivity.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/msg.c b/src/lib/msg.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/msgdumpbuf.c b/src/lib/msgdumpbuf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netbuffer.c b/src/lib/netbuffer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netbufread.c b/src/lib/netbufread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netcopy.c b/src/lib/netcopy.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netread.c b/src/lib/netread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netwrite.c b/src/lib/netwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parser.c b/src/lib/parser.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -314,21 +314,21 @@ static const short yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { - 0, 155, 158, 162, 199, 204, 215, 218, 222, 227, - 236, 242, 248, 258, 266, 273, 279, 285, 291, 297, - 303, 309, 315, 321, 327, 333, 340, 515, 527, 539, - 548, 555, 560, 573, 577, 583, 592, 594, 596, 600, - 617, 624, 634, 643, 647, 651, 655, 659, 663, 667, - 671, 677, 689, 698, 716, 734, 736, 740, 749, 761, - 773, 785, 797, 809, 814, 818, 824, 836, 841, 845, - 851, 863, 875, 887, 899, 908, 918, 930, 938, 944, - 951, 956, 961, 966, 971, 976, 981, 986, 991, 996, - 1001, 1006, 1011, 1016, 1021, 1026, 1031, 1036, 1041, 1046, - 1053, 1066, 1078, 1090, 1096, 1108, 1120, 1125, 1129, 1133, - 1139, 1151, 1163, 1175, 1187, 1199, 1208, 1217, 1229, 1238, - 1250, 1262, 1274, 1286, 1298, 1310, 1319, 1324, 1329, 1334, - 1339, 1344, 1349, 1354, 1359, 1364, 1369, 1374, 1379, 1384, - 1389, 1394, 1399, 1404, 1409, 1414 + 0, 155, 158, 162, 222, 227, 238, 241, 245, 250, + 256, 262, 268, 278, 286, 293, 299, 305, 311, 317, + 323, 329, 335, 341, 347, 353, 360, 535, 547, 559, + 568, 575, 580, 593, 597, 603, 612, 614, 616, 620, + 637, 644, 654, 663, 667, 671, 675, 679, 683, 687, + 691, 697, 709, 718, 736, 754, 756, 760, 769, 781, + 793, 805, 817, 829, 834, 838, 844, 856, 861, 865, + 871, 883, 895, 907, 919, 928, 938, 950, 958, 964, + 971, 976, 981, 986, 991, 996, 1001, 1006, 1011, 1016, + 1021, 1026, 1031, 1036, 1041, 1046, 1051, 1056, 1061, 1066, + 1073, 1086, 1098, 1110, 1116, 1128, 1140, 1145, 1149, 1153, + 1159, 1171, 1183, 1195, 1207, 1219, 1228, 1237, 1249, 1258, + 1270, 1282, 1294, 1306, 1318, 1330, 1339, 1344, 1349, 1354, + 1359, 1364, 1369, 1374, 1379, 1384, 1389, 1394, 1399, 1404, + 1409, 1414, 1419, 1424, 1429, 1434 }; #endif @@ -1267,6 +1267,32 @@ yyreduce: case 3: #line 167 "parser.y" { + /* Check for port duplicates, bindto duplicates */ + for (i = 0; i < nservice; i++) { + if (service[i].port == cur_service.port) { + if (service[i].bind && cur_service.bind && + !strcmp(service[i].bind, cur_service.bind)) + error ("Services %s and %s cannot bind to same IP %s and " + "port %d", + service[i].name, cur_service.name, + cur_service.bind, cur_service.port); + if (!service[i].bind && cur_service.bind) + error ("Services %s and %s use the same port %d, but " + "%s does not bind to a specific IP", + service[i].name, cur_service.name, + cur_service.port, service[i].name); + if (service[i].bind && !cur_service.bind) + error ("Services %s and %s use the same port %d, but " + "%s does not bind to a specific IP", + service[i].name, cur_service.name, + cur_service.port, cur_service.name); + if (!service[i].bind && !cur_service.bind) + error ("Services %s and %s use the same port without " + "binding to an IP", + service[i].name, cur_service.name); + } + } + /* Verify the service description, supply defaults * and so on. */ @@ -1282,15 +1308,12 @@ case 3: msg ("Service %s: shared memory key set to 0x%8.8x", cur_service.name, cur_service.shmkey); - if (!cur_service.bind) - cur_service.bind = "any"; - if (cur_service.rev_interval && cur_service.check_interval) error ("Service %s has both a revivinginterval and " "a checkinterval", cur_service.name); if (!cur_service.check_cmd) cur_service.check_cmd = xstrdup (""); - + /* Add to the list. */ service = xrealloc (service, ++nservice * sizeof(Service)); service[nservice - 1] = cur_service; @@ -1298,7 +1321,7 @@ case 3: ; break;} case 5: -#line 206 "parser.y" +#line 229 "parser.y" { psmsg ("service:", SYMBOL); for (i = 0; i < nservice; i++) @@ -1308,18 +1331,15 @@ case 5: ; break;} case 9: -#line 228 "parser.y" +#line 251 "parser.y" { pimsg ("sevice port:", yyvsp[0].set[0].v.ival); - for (i = 0; i < nservice; i++) - if (service[i].port == yyvsp[0].set[0].v.ival) - error ("Duplicate usage of port %d", yyvsp[0].set[0].v.ival); cur_service.port = yyvsp[0].set[0].v.ival; free (yyvsp[0].set); ; break;} case 10: -#line 237 "parser.y" +#line 257 "parser.y" { psmsg ("service binding:", yyvsp[0].set[0].v.sval); cur_service.bind = yyvsp[0].set[0].v.sval; @@ -1327,7 +1347,7 @@ case 10: ; break;} case 11: -#line 243 "parser.y" +#line 263 "parser.y" { pimsg ("service verbosity:", yyvsp[0].set[0].v.ival); cur_service.verbosity = yyvsp[0].set[0].v.ival; @@ -1335,7 +1355,7 @@ case 11: ; break;} case 12: -#line 249 "parser.y" +#line 269 "parser.y" { pimsg ("service dispatch mode:", yyvsp[0].set[0].v.ival); pimsg ("service dispatch over:", lastovernr); @@ -1347,7 +1367,7 @@ case 12: ; break;} case 13: -#line 259 "parser.y" +#line 279 "parser.y" { pimsg ("service revival interval:", yyvsp[0].set[0].v.ival); psmsg ("service revival cmd:", yyvsp[0].set[1].v.sval); @@ -1357,7 +1377,7 @@ case 13: ; break;} case 14: -#line 267 "parser.y" +#line 287 "parser.y" { pimsg ("service check interval:", yyvsp[0].set[0].v.ival); psmsg ("service check cmd:", yyvsp[0].set[1].v.sval); @@ -1366,7 +1386,7 @@ case 14: ; break;} case 15: -#line 274 "parser.y" +#line 294 "parser.y" { pimsg ("service backlog:", yyvsp[0].set[0].v.ival); cur_service.backlog = yyvsp[0].set[0].v.ival; @@ -1374,7 +1394,7 @@ case 15: ; break;} case 16: -#line 280 "parser.y" +#line 300 "parser.y" { pimsg ("service shmkey:", yyvsp[0].set[0].v.ival); cur_service.shmkey = yyvsp[0].set[0].v.ival; @@ -1382,7 +1402,7 @@ case 16: ; break;} case 17: -#line 286 "parser.y" +#line 306 "parser.y" { pimsg ("connection timout:", yyvsp[0].set[0].v.ival); cur_service.connectiontimeout = yyvsp[0].set[0].v.ival; @@ -1390,7 +1410,7 @@ case 17: ; break;} case 18: -#line 292 "parser.y" +#line 312 "parser.y" { pimsg ("max clients in service:", yyvsp[0].set[0].v.ival); cur_service.maxconnections = yyvsp[0].set[0].v.ival; @@ -1398,7 +1418,7 @@ case 18: ; break;} case 19: -#line 298 "parser.y" +#line 318 "parser.y" { pimsg ("service type: ", yyvsp[0].set[0].v.ival); cur_service.type = yyvsp[0].set[0].v.ival; @@ -1406,7 +1426,7 @@ case 19: ; break;} case 20: -#line 304 "parser.y" +#line 324 "parser.y" { pimsg ("service header inspection: ", yyvsp[0].set[0].v.ival); cur_service.inspection = yyvsp[0].set[0].v.ival; @@ -1414,7 +1434,7 @@ case 20: ; break;} case 21: -#line 310 "parser.y" +#line 330 "parser.y" { psmsg ("allow from: ", yyvsp[0].set[0].v.sval); add_allowfrom (yyvsp[0].set[0].v.sval); @@ -1422,7 +1442,7 @@ case 21: ; break;} case 22: -#line 316 "parser.y" +#line 336 "parser.y" { psmsg ("allow file: ", yyvsp[0].set[0].v.sval); cur_service.allowfile = yyvsp[0].set[0].v.sval; @@ -1430,7 +1450,7 @@ case 22: ; break;} case 23: -#line 322 "parser.y" +#line 342 "parser.y" { psmsg ("deny from: ", yyvsp[0].set[0].v.sval); add_denyfrom (yyvsp[0].set[0].v.sval); @@ -1438,7 +1458,7 @@ case 23: ; break;} case 24: -#line 328 "parser.y" +#line 348 "parser.y" { psmsg ("deny file: ", yyvsp[0].set[0].v.sval); cur_service.denyfile = yyvsp[0].set[0].v.sval; @@ -1446,7 +1466,7 @@ case 24: ; break;} case 25: -#line 334 "parser.y" +#line 354 "parser.y" { psmsg ("user account: ", yyvsp[0].set[0].v.sval); setuseraccount (yyvsp[0].set[0].v.sval); @@ -1455,7 +1475,7 @@ case 25: ; break;} case 26: -#line 341 "parser.y" +#line 361 "parser.y" { pimsg ("converting backend statements, count is", yyvsp[0].n); for (i = 0; i < yyvsp[0].n; i++) @@ -1630,7 +1650,7 @@ case 26: ; break;} case 27: -#line 518 "parser.y" +#line 538 "parser.y" { pimsg ("port statement:", lastnr); yyval.n = 1; @@ -1640,7 +1660,7 @@ case 27: ; break;} case 28: -#line 530 "parser.y" +#line 550 "parser.y" { psmsg ("bindto statement:", laststr); yyval.n = 1; @@ -1650,7 +1670,7 @@ case 28: ; break;} case 29: -#line 541 "parser.y" +#line 561 "parser.y" { setlaststr (laststring); free (laststring); @@ -1658,13 +1678,13 @@ case 29: ; break;} case 30: -#line 550 "parser.y" +#line 570 "parser.y" { setlastnr (SYMBOL); ; break;} case 32: -#line 564 "parser.y" +#line 584 "parser.y" { pimsg ("verbosity statement:", lastnr); yyval.n = 1; @@ -1674,25 +1694,25 @@ case 32: ; break;} case 33: -#line 574 "parser.y" +#line 594 "parser.y" { lastnr = 1; ; break;} case 34: -#line 578 "parser.y" +#line 598 "parser.y" { lastnr = 0; ; break;} case 35: -#line 587 "parser.y" +#line 607 "parser.y" { yyval = yyvsp[-2]; ; break;} case 39: -#line 602 "parser.y" +#line 622 "parser.y" { pimsg ("dispatch mode statement:", lastnr); yyval.n = 1; @@ -1708,13 +1728,13 @@ case 39: ; break;} case 40: -#line 619 "parser.y" +#line 639 "parser.y" { setlastovernr (SYMBOL); ; break;} case 41: -#line 625 "parser.y" +#line 645 "parser.y" { psmsg ("external handler:", laststr); if (lastnr != ds_externalhandler) @@ -1724,7 +1744,7 @@ case 41: ; break;} case 42: -#line 636 "parser.y" +#line 656 "parser.y" { yyval.n = 1; yyval.set = xmalloc (sizeof(Confset)); @@ -1732,55 +1752,55 @@ case 42: ; break;} case 43: -#line 644 "parser.y" +#line 664 "parser.y" { lastnr = ds_roundrobin; ; break;} case 44: -#line 648 "parser.y" +#line 668 "parser.y" { lastnr = ds_random; ; break;} case 45: -#line 652 "parser.y" +#line 672 "parser.y" { lastnr = ds_byduration; ; break;} case 46: -#line 656 "parser.y" +#line 676 "parser.y" { lastnr = ds_bysize; ; break;} case 47: -#line 660 "parser.y" +#line 680 "parser.y" { lastnr = ds_byorder; ; break;} case 48: -#line 664 "parser.y" +#line 684 "parser.y" { lastnr = ds_byconnections; ; break;} case 49: -#line 668 "parser.y" +#line 688 "parser.y" { lastnr = ds_externalhandler; ; break;} case 50: -#line 672 "parser.y" +#line 692 "parser.y" { lastnr = ds_byclientip; ; break;} case 51: -#line 680 "parser.y" +#line 700 "parser.y" { psmsg ("user account statement:", laststr); yyval.n = 1; @@ -1790,7 +1810,7 @@ case 51: ; break;} case 52: -#line 691 "parser.y" +#line 711 "parser.y" { setlaststr (laststring); free (laststring); @@ -1798,7 +1818,7 @@ case 52: ; break;} case 53: -#line 702 "parser.y" +#line 722 "parser.y" { pimsg ("reviving interval statement:", lastnr); yyval.n = 2; @@ -1813,7 +1833,7 @@ case 53: ; break;} case 54: -#line 720 "parser.y" +#line 740 "parser.y" { pimsg ("check interval:", lastnr); yyval.n = 2; @@ -1828,7 +1848,7 @@ case 54: ; break;} case 57: -#line 742 "parser.y" +#line 762 "parser.y" { yyval.n = 1; yyval.set = xmalloc (sizeof(Confset)); @@ -1836,7 +1856,7 @@ case 57: ; break;} case 58: -#line 752 "parser.y" +#line 772 "parser.y" { pimsg ("backlog statement:", lastnr); yyval.n = 1; @@ -1846,7 +1866,7 @@ case 58: ; break;} case 59: -#line 764 "parser.y" +#line 784 "parser.y" { pimsg ("shmkey statement:", lastnr); yyval.n = 1; @@ -1856,7 +1876,7 @@ case 59: ; break;} case 60: -#line 776 "parser.y" +#line 796 "parser.y" { pimsg ("connection timeout statement:", lastnr); yyval.n = 1; @@ -1866,7 +1886,7 @@ case 60: ; break;} case 61: -#line 788 "parser.y" +#line 808 "parser.y" { pimsg ("max clients statement (service):", lastnr); yyval.n = 1; @@ -1876,7 +1896,7 @@ case 61: ; break;} case 62: -#line 800 "parser.y" +#line 820 "parser.y" { pimsg ("service type:", lastnr); yyval.n = 1; @@ -1886,19 +1906,19 @@ case 62: ; break;} case 64: -#line 815 "parser.y" +#line 835 "parser.y" { lastnr = type_any; ; break;} case 65: -#line 819 "parser.y" +#line 839 "parser.y" { lastnr = type_http; ; break;} case 66: -#line 827 "parser.y" +#line 847 "parser.y" { pimsg ("service header inspection: ", lastnr); yyval.n = 1; @@ -1908,19 +1928,19 @@ case 66: ; break;} case 68: -#line 842 "parser.y" +#line 862 "parser.y" { lastnr = ins_deep; ; break;} case 69: -#line 846 "parser.y" +#line 866 "parser.y" { lastnr = ins_shallow; ; break;} case 70: -#line 854 "parser.y" +#line 874 "parser.y" { psmsg ("allow from: ", laststr); yyval.n = 1; @@ -1930,7 +1950,7 @@ case 70: ; break;} case 71: -#line 866 "parser.y" +#line 886 "parser.y" { psmsg ("allow from: ", laststr); yyval.n = 1; @@ -1940,7 +1960,7 @@ case 71: ; break;} case 72: -#line 878 "parser.y" +#line 898 "parser.y" { psmsg ("allow file: ", laststr); yyval.n = 1; @@ -1950,7 +1970,7 @@ case 72: ; break;} case 73: -#line 890 "parser.y" +#line 910 "parser.y" { psmsg ("allow file: ", laststr); yyval.n = 1; @@ -1960,7 +1980,7 @@ case 73: ; break;} case 74: -#line 901 "parser.y" +#line 921 "parser.y" { setlaststr (laststring); free (laststring); @@ -1968,13 +1988,13 @@ case 74: ; break;} case 75: -#line 913 "parser.y" +#line 933 "parser.y" { yyval = yyvsp[-1]; ; break;} case 76: -#line 920 "parser.y" +#line 940 "parser.y" { psmsg ("backend name:", SYMBOL); for (i = 0; i < cur_service.nbackend; i++) @@ -1985,7 +2005,7 @@ case 76: ; break;} case 77: -#line 932 "parser.y" +#line 952 "parser.y" { yyvsp[-1].n++; yyvsp[-1].set = xrealloc (yyvsp[-1].set, yyvsp[-1].n * sizeof(Confset)); @@ -1994,159 +2014,159 @@ case 77: ; break;} case 78: -#line 939 "parser.y" +#line 959 "parser.y" { yyval = yyvsp[0]; ; break;} case 79: -#line 946 "parser.y" +#line 966 "parser.y" { yyval = yyvsp[0]; ; break;} case 80: -#line 952 "parser.y" +#line 972 "parser.y" { psmsg ("backend server:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 81: -#line 957 "parser.y" +#line 977 "parser.y" { pimsg ("backend port:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 82: -#line 962 "parser.y" +#line 982 "parser.y" { pimsg ("backend verbosity:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 83: -#line 967 "parser.y" +#line 987 "parser.y" { psmsg ("backend onstart:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 84: -#line 972 "parser.y" +#line 992 "parser.y" { psmsg ("backend onend:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 85: -#line 977 "parser.y" +#line 997 "parser.y" { psmsg ("backend onfail:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 86: -#line 982 "parser.y" +#line 1002 "parser.y" { psmsg ("backend trafficlog:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 87: -#line 987 "parser.y" +#line 1007 "parser.y" { psmsg ("backend trafficlog:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 88: -#line 992 "parser.y" +#line 1012 "parser.y" { pimsg ("backend weight:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 89: -#line 997 "parser.y" +#line 1017 "parser.y" { pimsg ("backend decay:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 90: -#line 1002 "parser.y" +#line 1022 "parser.y" { pimsg ("backend maxconnections:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 91: -#line 1007 "parser.y" +#line 1027 "parser.y" { psmsg ("backend sticky cookie:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 92: -#line 1012 "parser.y" +#line 1032 "parser.y" { psmsg ("addclientheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 93: -#line 1017 "parser.y" +#line 1037 "parser.y" { psmsg ("setclientheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 94: -#line 1022 "parser.y" +#line 1042 "parser.y" { psmsg ("appendclientheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 95: -#line 1027 "parser.y" +#line 1047 "parser.y" { psmsg ("addserverheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 96: -#line 1032 "parser.y" +#line 1052 "parser.y" { psmsg ("setserverheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 97: -#line 1037 "parser.y" +#line 1057 "parser.y" { psmsg ("appendserverheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 98: -#line 1042 "parser.y" +#line 1062 "parser.y" { pimsg ("backend retries:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 99: -#line 1047 "parser.y" +#line 1067 "parser.y" { pimsg ("backend state:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 100: -#line 1057 "parser.y" +#line 1077 "parser.y" { psmsg ("server statement:", laststr); yyval.n = 1; @@ -2156,7 +2176,7 @@ case 100: ; break;} case 101: -#line 1069 "parser.y" +#line 1089 "parser.y" { pimsg ("weight statement", lastnr); yyval.n = 1; @@ -2166,7 +2186,7 @@ case 101: ; break;} case 102: -#line 1081 "parser.y" +#line 1101 "parser.y" { pimsg ("decay statement", lastnr); yyval.n = 1; @@ -2176,13 +2196,13 @@ case 102: ; break;} case 103: -#line 1091 "parser.y" +#line 1111 "parser.y" { setlaststr (laststring); ; break;} case 104: -#line 1099 "parser.y" +#line 1119 "parser.y" { pimsg ("retries:", lastnr); yyval.n = 1; @@ -2192,7 +2212,7 @@ case 104: ; break;} case 105: -#line 1111 "parser.y" +#line 1131 "parser.y" { pimsg ("state:", lastnr); yyval.n = 1; @@ -2202,25 +2222,25 @@ case 105: ; break;} case 107: -#line 1126 "parser.y" +#line 1146 "parser.y" { lastnr = st_available; ; break;} case 108: -#line 1130 "parser.y" +#line 1150 "parser.y" { lastnr = st_unavailable; ; break;} case 109: -#line 1134 "parser.y" +#line 1154 "parser.y" { lastnr = st_down; ; break;} case 110: -#line 1142 "parser.y" +#line 1162 "parser.y" { psmsg ("onstart statement:", laststr); yyval.n = 1; @@ -2230,7 +2250,7 @@ case 110: ; break;} case 111: -#line 1154 "parser.y" +#line 1174 "parser.y" { psmsg ("onfail statement:", laststr); yyval.n = 1; @@ -2240,7 +2260,7 @@ case 111: ; break;} case 112: -#line 1166 "parser.y" +#line 1186 "parser.y" { psmsg ("onend statement:", laststr); yyval.n = 1; @@ -2250,7 +2270,7 @@ case 112: ; break;} case 113: -#line 1178 "parser.y" +#line 1198 "parser.y" { psmsg ("trafficlog statement:", laststr); yyval.n = 1; @@ -2260,7 +2280,7 @@ case 113: ; break;} case 114: -#line 1190 "parser.y" +#line 1210 "parser.y" { psmsg ("throughputlog statement:", laststr); yyval.n = 1; @@ -2270,7 +2290,7 @@ case 114: ; break;} case 115: -#line 1201 "parser.y" +#line 1221 "parser.y" { setlaststr (laststring); free (laststring); @@ -2278,7 +2298,7 @@ case 115: ; break;} case 116: -#line 1210 "parser.y" +#line 1230 "parser.y" { setlaststr (laststring); free (laststring); @@ -2286,7 +2306,7 @@ case 116: ; break;} case 117: -#line 1220 "parser.y" +#line 1240 "parser.y" { psmsg ("insertcookie statement:", laststr); yyval.n = 1; @@ -2296,7 +2316,7 @@ case 117: ; break;} case 118: -#line 1231 "parser.y" +#line 1251 "parser.y" { setlaststr (laststring); free (laststring); @@ -2304,7 +2324,7 @@ case 118: ; break;} case 119: -#line 1241 "parser.y" +#line 1261 "parser.y" { psmsg ("addclientheader statement:", laststr); yyval.n = 1; @@ -2314,7 +2334,7 @@ case 119: ; break;} case 120: -#line 1253 "parser.y" +#line 1273 "parser.y" { psmsg ("setclientheader statement:", laststr); yyval.n = 1; @@ -2324,7 +2344,7 @@ case 120: ; break;} case 121: -#line 1265 "parser.y" +#line 1285 "parser.y" { psmsg ("appendclientheader statement:", laststr); yyval.n = 1; @@ -2334,7 +2354,7 @@ case 121: ; break;} case 122: -#line 1277 "parser.y" +#line 1297 "parser.y" { psmsg ("addserverheader statement:", laststr); yyval.n = 1; @@ -2344,7 +2364,7 @@ case 122: ; break;} case 123: -#line 1289 "parser.y" +#line 1309 "parser.y" { psmsg ("setserverheader statement:", laststr); yyval.n = 1; @@ -2354,7 +2374,7 @@ case 123: ; break;} case 124: -#line 1301 "parser.y" +#line 1321 "parser.y" { psmsg ("appendserverheader statement:", laststr); yyval.n = 1; @@ -2364,7 +2384,7 @@ case 124: ; break;} case 125: -#line 1312 "parser.y" +#line 1332 "parser.y" { setlaststr (laststring); free (laststring); @@ -2372,121 +2392,121 @@ case 125: ; break;} case 126: -#line 1319 "parser.y" +#line 1339 "parser.y" { yyerrmsg = "HTTP header specifier expected"; ; break;} case 127: -#line 1324 "parser.y" +#line 1344 "parser.y" { yyerrmsg = "cookie specifier expected"; ; break;} case 128: -#line 1329 "parser.y" +#line 1349 "parser.y" { yyerrmsg = "number expected"; ; break;} case 129: -#line 1334 "parser.y" +#line 1354 "parser.y" { yyerrmsg = "hostname or IP address expected"; ; break;} case 130: -#line 1339 "parser.y" +#line 1359 "parser.y" { yyerrmsg = "'service' expected"; ; break;} case 131: -#line 1344 "parser.y" +#line 1364 "parser.y" { yyerrmsg = "backend definition statement expected"; ; break;} case 132: -#line 1349 "parser.y" +#line 1369 "parser.y" { yyerrmsg = "service body statement expected"; ; break;} case 133: -#line 1354 "parser.y" +#line 1374 "parser.y" { yyerrmsg = "semicolon (;) expected"; ; break;} case 134: -#line 1359 "parser.y" +#line 1379 "parser.y" { yyerrmsg = "'on' or 'off' expetcted"; ; break;} case 135: -#line 1364 "parser.y" +#line 1384 "parser.y" { yyerrmsg = "dispatch method expected"; ; break;} case 136: -#line 1369 "parser.y" +#line 1389 "parser.y" { yyerrmsg = "command line expected"; ; break;} case 137: -#line 1374 "parser.y" +#line 1394 "parser.y" { yyerrmsg = "file name expected"; ; break;} case 138: -#line 1379 "parser.y" +#line 1399 "parser.y" { yyerrmsg = "service name (identifier) expected"; ; break;} case 139: -#line 1384 "parser.y" +#line 1404 "parser.y" { yyerrmsg = "backend name (identifier) expected"; ; break;} case 140: -#line 1389 "parser.y" +#line 1409 "parser.y" { yyerrmsg = "IP address such as 1.2.3.4 or 'any' expected"; ; break;} case 141: -#line 1394 "parser.y" +#line 1414 "parser.y" { yyerrmsg = "Service type expected ('any', 'stickyhttp', ...)"; ; break;} case 142: -#line 1399 "parser.y" +#line 1419 "parser.y" { yyerrmsg = "Header inspection mode mode expected ('shallow' or 'deep')"; ; break;} case 143: -#line 1404 "parser.y" +#line 1424 "parser.y" { yyerrmsg = "IP filter(s) expected"; ; break;} case 144: -#line 1409 "parser.y" +#line 1429 "parser.y" { yyerrmsg = "username expected"; ; break;} case 145: -#line 1414 "parser.y" +#line 1434 "parser.y" { yyerrmsg = "state definition expected"; ; @@ -2724,4 +2744,4 @@ yyreturn: #endif return yyresult; } -#line 1418 "parser.y" +#line 1438 "parser.y" diff --git a/src/lib/parser.y b/src/lib/parser.y @@ -165,6 +165,32 @@ element: '{' servicestatements '}' { + /* Check for port duplicates, bindto duplicates */ + for (i = 0; i < nservice; i++) { + if (service[i].port == cur_service.port) { + if (service[i].bind && cur_service.bind && + !strcmp(service[i].bind, cur_service.bind)) + error ("Services %s and %s cannot bind to same IP %s and " + "port %d", + service[i].name, cur_service.name, + cur_service.bind, cur_service.port); + if (!service[i].bind && cur_service.bind) + error ("Services %s and %s use the same port %d, but " + "%s does not bind to a specific IP", + service[i].name, cur_service.name, + cur_service.port, service[i].name); + if (service[i].bind && !cur_service.bind) + error ("Services %s and %s use the same port %d, but " + "%s does not bind to a specific IP", + service[i].name, cur_service.name, + cur_service.port, cur_service.name); + if (!service[i].bind && !cur_service.bind) + error ("Services %s and %s use the same port without " + "binding to an IP", + service[i].name, cur_service.name); + } + } + /* Verify the service description, supply defaults * and so on. */ @@ -180,15 +206,12 @@ element: msg ("Service %s: shared memory key set to 0x%8.8x", cur_service.name, cur_service.shmkey); - if (!cur_service.bind) - cur_service.bind = "any"; - if (cur_service.rev_interval && cur_service.check_interval) error ("Service %s has both a revivinginterval and " "a checkinterval", cur_service.name); if (!cur_service.check_cmd) cur_service.check_cmd = xstrdup (""); - + /* Add to the list. */ service = xrealloc (service, ++nservice * sizeof(Service)); service[nservice - 1] = cur_service; @@ -227,9 +250,6 @@ servicestatement: servicebody: portstatement { pimsg ("sevice port:", $1.set[0].v.ival); - for (i = 0; i < nservice; i++) - if (service[i].port == $1.set[0].v.ival) - error ("Duplicate usage of port %d", $1.set[0].v.ival); cur_service.port = $1.set[0].v.ival; free ($1.set); } diff --git a/src/lib/parserclose.c b/src/lib/parserclose.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserfilename.c b/src/lib/parserfilename.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserinput.c b/src/lib/parserinput.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parseropen.c b/src/lib/parseropen.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserrun.c b/src/lib/parserrun.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserskipchar.c b/src/lib/parserskipchar.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserskipline.c b/src/lib/parserskipline.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/restart.c b/src/lib/restart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/runservice.c b/src/lib/runservice.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/serve.c b/src/lib/serve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/setproctitle.c b/src/lib/setproctitle.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/showconfig.c b/src/lib/showconfig.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/showservices.c b/src/lib/showservices.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/showstatus.c b/src/lib/showstatus.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/stagetostring.c b/src/lib/stagetostring.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/statetostring.c b/src/lib/statetostring.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/stopdaemon.c b/src/lib/stopdaemon.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -23,7 +23,7 @@ int stop_daemon (int ac, char **av) { result++; } - /* Note: We run the deallocator of shmem here anyeay, though the + /* Note: We run the deallocator of shmem here anyway, though the * signalled listener does it too.. just to make sure.. We do this * only if above kills have succeeded. */ diff --git a/src/lib/strcasestr.c b/src/lib/strcasestr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strexpandformat.c b/src/lib/strexpandformat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/stringtostate.c b/src/lib/stringtostate.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strlcat.c b/src/lib/strlcat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strprintf.c b/src/lib/strprintf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strupr.c b/src/lib/strupr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strvprintf.c b/src/lib/strvprintf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtabend.c b/src/lib/symtabend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtablookup.c b/src/lib/symtablookup.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtabset.c b/src/lib/symtabset.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtabstart.c b/src/lib/symtabstart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/sysrun.c b/src/lib/sysrun.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/tcpserve.c b/src/lib/tcpserve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/tellservice.c b/src/lib/tellservice.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/thruputlog.c b/src/lib/thruputlog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/trafficlog.c b/src/lib/trafficlog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/uidassume.c b/src/lib/uidassume.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/uidrestore.c b/src/lib/uidrestore.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/unlockreporter.c b/src/lib/unlockreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/usage.c b/src/lib/usage.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/vsyslog.c b/src/lib/vsyslog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/wakeuphandler.c b/src/lib/wakeuphandler.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/warning.c b/src/lib/warning.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/writelog.c b/src/lib/writelog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xcalloc.c b/src/lib/xcalloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xmalloc.c b/src/lib/xmalloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xrealloc.c b/src/lib/xrealloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xstrcat.c b/src/lib/xstrcat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xstrcatch.c b/src/lib/xstrcatch.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xstrdup.c b/src/lib/xstrdup.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.54, a load balancer and fail over + * This file is part of Crosroads 1.55, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/test/bad17.conf b/test/bad17.conf @@ -0,0 +1,14 @@ +/* + * Two service statements with same ports and same bindto's. + */ +service one { + port 80; + bindto 1.2.3.4; + backend one { server 10.1.1.1:80; } +} + +service two { + port 80; + bindto 1.2.3.4; + backend two { server 10.1.1.1:80; } +} diff --git a/test/bad18.conf b/test/bad18.conf @@ -0,0 +1,13 @@ +/* + * Two service statements with same ports and only one has a bindto. + */ +service one { + port 80; + bindto 1.2.3.4; + backend one { server 10.1.1.1:80; } +} + +service two { + port 80; + backend two { server 10.1.1.1:80; } +} diff --git a/test/bad19.conf b/test/bad19.conf @@ -0,0 +1,12 @@ +/* + * Two service statements with same ports and no bindto's. + */ +service one { + port 80; + backend one { server 10.1.1.1:80; } +} + +service two { + port 80; + backend two { server 10.1.1.1:80; } +} diff --git a/test/bad20.conf b/test/bad20.conf @@ -0,0 +1,13 @@ +/* + * Two service statements with same ports and only one has a bindto. + */ +service one { + port 80; + backend one { server 10.1.1.1:80; } +} + +service two { + port 80; + bindto 1.2.3.4; + backend two { server 10.1.1.1:80; } +} diff --git a/test/t15.conf b/test/t15.conf @@ -0,0 +1,14 @@ +/* + * Two service statements with same ports but different bindto's. + */ +service one { + port 80; + bindto 1.2.3.4; + backend one { server 10.1.1.1:80; } +} + +service two { + port 80; + bindto 5.6.7.8; + backend two { server 10.1.1.1:80; } +}