crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs | LICENSE

commit 5107aefbb6614e7b6545259a797f45a8187bf9f3
parent b6785f3a728827d035f29d1e7ceba06a59dad6c8
Author: finwo <finwo@pm.me>
Date:   Sat,  3 Jan 2026 19:31:10 +0100

1.32

Diffstat:
MChangeLog | 6++++++
Mdoc/conf/dispatchmode.yo | 6++++++
Mdoc/crossroads.html | 231++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
Mdoc/crossroads.man | 115++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------
Mdoc/crossroads.pdf | 0
Mdoc/crossroads.yo | 5++---
Mdoc/tips.yo | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
Metc/Makefile.def | 2+-
Msrc/allocreporter.c | 2+-
Msrc/ansistamp.c | 2+-
Msrc/backendavailable.c | 2+-
Msrc/backendconnect.c | 2+-
Msrc/backendcount.c | 2+-
Msrc/choosebackend.c | 27++++++++++++++++++++++++---
Msrc/configtest.c | 2+-
Msrc/copysockets.c | 2+-
Msrc/createcommandlinespace.c | 2+-
Msrc/crossroads.h | 4+++-
Msrc/deallocreporter.c | 2+-
Msrc/decrclientcount.c | 2+-
Msrc/error.c | 2+-
Msrc/forktcpservicer.c | 2+-
Msrc/httpcopy.c | 2+-
Msrc/httperror.c | 2+-
Msrc/httpheaderaddheader.c | 2+-
Msrc/httpheaderappendheader.c | 2+-
Msrc/httpheaderconnectiontype.c | 2+-
Msrc/httpheaderfree.c | 2+-
Msrc/httpheaderhascookie.c | 2+-
Msrc/httpheaderhttpver.c | 2+-
Msrc/httpheadernew.c | 2+-
Msrc/httpheaderread.c | 2+-
Msrc/httpheaderremoveheader.c | 2+-
Msrc/httpheadersetheader.c | 2+-
Msrc/httpheaderval.c | 2+-
Msrc/httpheaderwrite.c | 2+-
Msrc/httpinsertheader.c | 2+-
Msrc/httpserve.c | 2+-
Msrc/httpserversocket.c | 2+-
Msrc/httpwrite.c | 2+-
Msrc/incrclientcount.c | 2+-
Msrc/initsockaddr.c | 2+-
Msrc/interrupt.c | 2+-
Msrc/ipfaddallow.c | 2+-
Msrc/ipfadddeny.c | 2+-
Msrc/ipfallowed.c | 2+-
Msrc/ipfdenied.c | 2+-
Msrc/ipfloadfile.c | 2+-
Msrc/ipfmatch.c | 2+-
Msrc/ipfparse.c | 2+-
Msrc/ishexdigit.c | 2+-
Msrc/isspace.c | 2+-
Msrc/lexer.c | 650++++++++++++++++++++++++++++++++++++++++---------------------------------------
Msrc/lexer.l | 5+++++
Msrc/lockreporter.c | 2+-
Msrc/logactivityany.c | 2+-
Msrc/logactivitycontinuation.c | 2+-
Msrc/logactivityend.c | 2+-
Msrc/logactivitystart.c | 2+-
Msrc/main.c | 2+-
Msrc/makesocket.c | 2+-
Msrc/markactivity.c | 2+-
Msrc/msg.c | 2+-
Msrc/msgdumpbuf.c | 2+-
Msrc/netbuffer.c | 2+-
Msrc/netbufread.c | 2+-
Msrc/netcopy.c | 17++++++++++++-----
Msrc/netread.c | 17+++++++++++++----
Msrc/netwrite.c | 2+-
Msrc/parser.c | 613++++++++++++++++++++++++++++++++++++++++---------------------------------------
Msrc/parser.h | 3++-
Msrc/parser.y | 6+++++-
Msrc/restart.c | 2+-
Msrc/runservice.c | 2+-
Msrc/serve.c | 2+-
Msrc/setprogramtitle.c | 2+-
Msrc/showservices.c | 2+-
Msrc/showstatus.c | 2+-
Msrc/stagetostring.c | 2+-
Msrc/statetostring.c | 2+-
Msrc/stopdaemon.c | 2+-
Msrc/strcasestr.c | 2+-
Msrc/strexpandformat.c | 2+-
Msrc/stringtostate.c | 2+-
Msrc/strlcat.c | 2+-
Msrc/strprintf.c | 2+-
Msrc/strvprintf.c | 2+-
Msrc/sysrun.c | 2+-
Msrc/tcpserve.c | 2+-
Msrc/tellservice.c | 2+-
Msrc/thruputlog.c | 2+-
Msrc/trafficlog.c | 2+-
Msrc/uidassume.c | 2+-
Msrc/uidrestore.c | 2+-
Msrc/unlockreporter.c | 2+-
Msrc/usage.c | 2+-
Msrc/vsyslog.c | 2+-
Msrc/wakeuphandler.c | 2+-
Msrc/warning.c | 2+-
Msrc/writelog.c | 2+-
Msrc/xmalloc.c | 2+-
Msrc/xrealloc.c | 2+-
Msrc/xstrcat.c | 2+-
Msrc/xstrcatch.c | 2+-
Msrc/xstrdup.c | 2+-
105 files changed, 1104 insertions(+), 847 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,6 +1,12 @@ ChangeLog for Crossroads ------------------------------------------------------------------------------ +1.32 [KK 2007-03-30] Change net_read() and net_copy(): Read exceptions + on the client network socket don't issue error or warning + messages; clients are notorious for just dropping dead. Logging + this just clogs up the syslog. These situations are only logged + when verbosity is on. + 1.31 [KK 2007-03-21] Changed messaging from error to warning when a TCP write fails towards the server. The fact that the server hangs up, can be actually intended -- Crossroads can't make diff --git a/doc/conf/dispatchmode.yo b/doc/conf/dispatchmode.yo @@ -44,6 +44,12 @@ conf(dispatchmode - How are back ends selected) every time, unless it's unavailable. In that case the second is taken, and so on. + it() tt(dispatchmode byclientip): The client's IP address is + 'hashed' into a number, which is used to pick a back end. The + same client IP address will therefore always be dispatched to + the same back end. When the back end of choice is down, + tt(dispatchmode byconnections) is used. + it() tt(dispatchmode externalhandler) em(program arguments): This is a special mode, where an external program is delegated the responsibility to say which back end should be used diff --git a/doc/crossroads.html b/doc/crossroads.html @@ -1,12 +1,12 @@ <a name="defs.yo"></a><html><head> -<title>Crossroads 1.31</title> +<title>Crossroads 1.32</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.31</h1> +<h1>Crossroads 1.32</h1> <h2>Karel Kubat</h2> <h2>e-tunity</h2><h2>2005, 2006, ff.</h2> @@ -19,9 +19,8 @@ more. Crossroads is service-independent: it is usable for HTTP/HTTPS, SSH, SMTP, DNS, etc. In the case of HTTP balancing, Crossroads can modify HTTP headers, e.g. to - provide 'session stickiness' for - back-end processes that need sessions, but aren't - session-aware of other back-ends.</em></blockquote> + provide 'session stickiness' for back-end processes that need + sessions, but aren't session-aware of other back-ends.</em></blockquote> <h1>Table of Contents</h1> <dl> @@ -91,52 +90,53 @@ <dt><a href="#l47">5.2.2: Writing the external handler</a></dt> <dt><a href="#l48">5.2.3: Examples of external handlers</a></dt> </dl> -<dt><a href="#l49">5.3: HTTP Session Stickiness</a></dt> +<dt><a href="#l49">5.3: TCP Session Stickiness</a></dt> +<dt><a href="#l50">5.4: HTTP Session Stickiness</a></dt> <dl> -<dt><a href="#l50">5.3.1: Don't use stickiness!</a></dt> -<dt><a href="#l51">5.3.2: But if you must..</a></dt> +<dt><a href="#l51">5.4.1: Don't use stickiness!</a></dt> +<dt><a href="#l52">5.4.2: But if you must..</a></dt> </dl> -<dt><a href="#l52">5.4: Passing the client's IP address</a></dt> +<dt><a href="#l53">5.5: Passing the client's IP address</a></dt> <dl> -<dt><a href="#l53">5.4.1: Sample Crossroads configuration</a></dt> -<dt><a href="#l54">5.4.2: Sample Apache configuration</a></dt> +<dt><a href="#l54">5.5.1: Sample Crossroads configuration</a></dt> +<dt><a href="#l55">5.5.2: Sample Apache configuration</a></dt> </dl> -<dt><a href="#l55">5.5: Debugging network traffic</a></dt> -<dt><a href="#l56">5.6: Limiting Access to Crossroads by Client IP Address</a></dt> +<dt><a href="#l56">5.6: Debugging network traffic</a></dt> +<dt><a href="#l57">5.7: Limiting Access to Crossroads by Client IP Address</a></dt> <dl> -<dt><a href="#l57">5.6.1: General Examples</a></dt> -<dt><a href="#l58">5.6.2: Using External Files</a></dt> -<dt><a href="#l59">5.6.3: Mixing Directives</a></dt> +<dt><a href="#l58">5.7.1: General Examples</a></dt> +<dt><a href="#l59">5.7.2: Using External Files</a></dt> +<dt><a href="#l60">5.7.3: Mixing Directives</a></dt> </dl> -<dt><a href="#l60">5.7: Configuration examples</a></dt> +<dt><a href="#l61">5.8: Configuration examples</a></dt> <dl> -<dt><a href="#l61">5.7.1: A load balancer for three webserver back ends</a></dt> -<dt><a href="#l62">5.7.2: An HTTP forwarder when travelling</a></dt> -<dt><a href="#l63">5.7.3: SSH login with enforced idle logout</a></dt> +<dt><a href="#l62">5.8.1: A load balancer for three webserver back ends</a></dt> +<dt><a href="#l63">5.8.2: An HTTP forwarder when travelling</a></dt> +<dt><a href="#l64">5.8.3: SSH login with enforced idle logout</a></dt> </dl> </dl> -<dt><h3><a href="#l64">6: Benchmarking</a></h3></dt> +<dt><h3><a href="#l65">6: Benchmarking</a></h3></dt> <dl> -<dt><a href="#l65">6.1: Benchmark 1: Accessing a proxy via crossroads or directly</a></dt> +<dt><a href="#l66">6.1: Benchmark 1: Accessing a proxy via crossroads or directly</a></dt> <dl> -<dt><a href="#l66">6.1.1: Results</a></dt> -<dt><a href="#l67">6.1.2: Discussion</a></dt> +<dt><a href="#l67">6.1.1: Results</a></dt> +<dt><a href="#l68">6.1.2: Discussion</a></dt> </dl> -<dt><a href="#l68">6.2: Benchmark 2: Crossroads versus Linux Virtual Server (LVS)</a></dt> +<dt><a href="#l69">6.2: Benchmark 2: Crossroads versus Linux Virtual Server (LVS)</a></dt> <dl> -<dt><a href="#l69">6.2.1: Environment</a></dt> -<dt><a href="#l70">6.2.2: Tests and results</a></dt> +<dt><a href="#l70">6.2.1: Environment</a></dt> +<dt><a href="#l71">6.2.2: Tests and results</a></dt> </dl> </dl> -<dt><h3><a href="#l71">7: Compiling and Installing</a></h3></dt> +<dt><h3><a href="#l72">7: Compiling and Installing</a></h3></dt> <dl> -<dt><a href="#l72">7.1: Prerequisites</a></dt> -<dt><a href="#l73">7.2: Compiling and installing</a></dt> -<dt><a href="#l74">7.3: Configuring crossroads</a></dt> -<dt><a href="#l75">7.4: A boot script</a></dt> +<dt><a href="#l73">7.1: Prerequisites</a></dt> +<dt><a href="#l74">7.2: Compiling and installing</a></dt> +<dt><a href="#l75">7.3: Configuring crossroads</a></dt> +<dt><a href="#l76">7.4: A boot script</a></dt> <dl> -<dt><a href="#l76">7.4.1: SysV Style Startup</a></dt> -<dt><a href="#l77">7.4.2: BSD Style Startup</a></dt> +<dt><a href="#l77">7.4.1: SysV Style Startup</a></dt> +<dt><a href="#l78">7.4.2: BSD Style Startup</a></dt> </dl> <p><hr><p> @@ -726,6 +726,12 @@ The modifier <code>over</code> <em>connections</em> is optional. (The square every time, unless it's unavailable. In that case the second is taken, and so on. <p> +<li> <code>dispatchmode byclientip</code>: The client's IP address is + 'hashed' into a number, which is used to pick a back end. The + same client IP address will therefore always be dispatched to + the same back end. When the back end of choice is down, + <code>dispatchmode byconnections</code> is used. +<p> <li> <code>dispatchmode externalhandler</code> <em>program arguments</em>: This is a special mode, where an external program is delegated the responsibility to say which back end should be used @@ -1681,7 +1687,7 @@ sub readlast() { return ($ret); } msg ("No last-used back end (yet)\n"); - return (undef); + return (undef); } # Write back the last used back end, reply to Crossroads and stop @@ -1755,8 +1761,14 @@ The working of the script is basically as follows: <p> <p><strong>Dispatching by the client IP address</strong><br> <p> -The following example shows a useful real-life situation. The -situation is as follows: +The following example shows a useful real-life situation that +illustrates how dispatching by client IP address works. <strong>Note that</strong> +as of Crossroads 1.31, <code>dispatchmode byclientip</code> is implemented -- +so that the below description is somewhat superfluous. The code +snippets however can help you in modelling your own specific dispatch +modes, aided by external helpers. +<p> +The situation is as follows: <p> <ul> <li> Crossroads is used as a single-address point to forward @@ -2019,16 +2031,42 @@ if ($action eq 'dispatch') { <p> <a name="l49"></a> -<h3>5.3: HTTP Session Stickiness</h3> +<h3>5.3: TCP Session Stickiness</h3> +<p> +If you need to make sure that a client that once gets dispatched to a +given back end keeps re-visiting the back end, then Crossroads offers +the dispatch mode <code>byclientip</code>. This mode will only work when each +client is seen by Crossroads with its own specific IP address; ie., +this method won't work when clients reach Crossroads through a +masquerading firewall (in which case all clients would be seen as +having the firewall's IP address). +<p> +The <code>dispatchmode roundrobin</code> works as follows: +<p> +<ul> + <li> The client's IP address is taken in its string + representation and 'hashed' into a number. +<p> +<li> The number is brought back to the number of available + back ends (using a modulo-operation). +<p> +<li> The result defines the back end of choice.</ul> +<p> +If the preferred back end is unavailable, then the action that +Crossroads takes is to dispatch as if <code>byconnections</code>: of the +available back ends, the one with the least connections is taken. +<p> +<a name="l50"></a> +<h3>5.4: HTTP Session Stickiness</h3> <p> This section focuses on HTTP session stickiness. This term refers to the ability of a balancer to route a conversation between browser and -a backend farm always to the same back end. In other words: once a -back end is selected by the balancer, it will remain the back end of -choice, even for subsequent connections. +a backend farm with webservers always to the same back end. In other +words: once a back end is selected by the balancer, it will remain the +back end of choice, even for subsequent connections. <p> -<a name="l50"></a> -<strong>5.3.1: Don't use stickiness!</strong> +<a name="l51"></a> +<strong>5.4.1: Don't use stickiness!</strong> <p> The rule of thumb as far as the balancer is concerned, is: <strong>Do not use HTTP session stickiness unless you really have to.</strong> Enabling @@ -2059,11 +2097,34 @@ that all PHP applications have access to these data. Application servers such as Websphere can be configured to replicate session data between nodes. <p> -<a name="l51"></a> -<strong>5.3.2: But if you must..</strong> +<a name="l52"></a> +<strong>5.4.2: But if you must..</strong> <p> -However, if you <strong>must</strong> use session stickiness, then proceed as -follows: +If you really need stickiness, think first whether you might use TCP +stickiness (using the client's IP address to dispatch). If you can, +then this is the preferred method, since Crossroads won't have to +unpack TCP streams. Below is a short configuration example: +<p> +<pre> +service www { + port 80; + type any; + revivinginterval 15; + dispatchmode byclientip; + + backend one { + server 10.1.1.100:80; + } + + backend two { + server 10.1.1.101:80; + } +} +</pre> + +<p> +However, if you <strong>must</strong> use HTTP-base session stickiness, then +proceed as follows: <p> <ul> <li> At the level of a <code>service</code> description, set the type to @@ -2114,8 +2175,8 @@ Note how the cookie names and values in the directives <code>stickycookie</code> and <code>addclientheader</code> match. That is obviously a prerequisite for stickiness. <p> -<a name="l52"></a> -<h3>5.4: Passing the client's IP address</h3> +<a name="l53"></a> +<h3>5.5: Passing the client's IP address</h3> <p> Since Crossroads just shuttles bytes to and fro, meta-information of network connections is lost. As far as the back ends are concerned, @@ -2142,8 +2203,8 @@ header: <code>X-Real-IP</code>, holding the client's IP address. performance will be hampered -- all passing messages will have to be unpacked and analyzed. <p> -<a name="l53"></a> -<strong>5.4.1: Sample Crossroads configuration</strong> +<a name="l54"></a> +<strong>5.5.1: Sample Crossroads configuration</strong> <p> The below sample configuration shows two HTTP back ends that receive the client's IP address: @@ -2169,8 +2230,8 @@ service www { </pre> <p> -<a name="l54"></a> -<strong>5.4.2: Sample Apache configuration</strong> +<a name="l55"></a> +<strong>5.5.2: Sample Apache configuration</strong> <p> The method by which each back end analyzes the header <code>X-Real-IP</code> will obviously be different per server implementations. However, a @@ -2201,8 +2262,8 @@ LogFormat "%{X-Real-IP}i %l %u %t %D \"%r\" %&gt;s %b" common </pre> <p> -<a name="l55"></a> -<h3>5.5: Debugging network traffic</h3> +<a name="l56"></a> +<h3>5.6: Debugging network traffic</h3> <p> Incase the traffic between client and backend @@ -2325,11 +2386,11 @@ Summarizing, the throughput times of a client-back end connection analyze the output and to compute round trip times. Such scripts are not (yet) included in Crossroads. <p> -<a name="l56"></a> -<h3>5.6: Limiting Access to Crossroads by Client IP Address</h3> -<p> <a name="l57"></a> -<strong>5.6.1: General Examples</strong> +<h3>5.7: Limiting Access to Crossroads by Client IP Address</h3> +<p> +<a name="l58"></a> +<strong>5.7.1: General Examples</strong> <p> The directives <code>allowfrom</code>, <code>denyfrom</code>, <code>allowfile</code> and <code>denyfile</code> can be used to instruct Crossroads to specifically allow @@ -2365,8 +2426,8 @@ with 192.168.1. The specifier <code>192.168.1/24</code> states that there are three network bytes (192, 168 and 1), and 24 bits (or 3 bytes) are relevant; so that the fourth network byte doesn't matter. <p> -<a name="l58"></a> -<strong>5.6.2: Using External Files</strong> +<a name="l59"></a> +<strong>5.7.2: Using External Files</strong> <p> The directives <code>allowfile</code> and <code>denyfile</code> allow you to specify IP addresses in external files. The Crossroads configuration states @@ -2397,8 +2458,8 @@ is running, you may edit <code>/tmp/allow.txt</code>, and then issue <code>killa -1 crossroads</code>. The new contents of <code>/tmp/allow.txt</code> will be reloaded. <p> -<a name="l59"></a> -<strong>5.6.3: Mixing Directives</strong> +<a name="l60"></a> +<strong>5.7.3: Mixing Directives</strong> <p> Crossroads allows to mix all directives in one service description. However, some mixes are less meaningful than others. It's @@ -2464,15 +2525,15 @@ There is a technical reason for this. Once Crossroads Crossroads doesn't check for such configurations, which are syntactially correct, but make no semantic sense.</ul> <p> -<a name="l60"></a> -<h3>5.7: Configuration examples</h3> +<a name="l61"></a> +<h3>5.8: Configuration examples</h3> <p> As a general hint, use <code>crossroads sampleconf</code> to view the most up-to-date examples of configurations. The description below shows a few examples too. <p> -<a name="l61"></a> -<strong>5.7.1: A load balancer for three webserver back ends</strong> +<a name="l62"></a> +<strong>5.8.1: A load balancer for three webserver back ends</strong> <p> The following configuration example binds crossroads to port 80 of the current server, and distributes the load over three back ends. This @@ -2600,8 +2661,8 @@ service www { </pre> <p> -<a name="l62"></a> -<strong>5.7.2: An HTTP forwarder when travelling</strong> +<a name="l63"></a> +<strong>5.8.2: An HTTP forwarder when travelling</strong> <p> As another example, here's my <code>crossroads.conf</code> that I use on my Unix laptop. The problem that I face is that I need many HTTP proxy @@ -2689,8 +2750,8 @@ and <code>LocalSquid</code> are both active, then <code>crossroads tell httpprox sshtunnel down</code> will 'take down' the back end <code>SshTunnel</code> -- and will automatically cause crossroads to switch to <code>LocalSquid</code>. <p> -<a name="l63"></a> -<strong>5.7.3: SSH login with enforced idle logout</strong> +<a name="l64"></a> +<strong>5.8.3: SSH login with enforced idle logout</strong> <p> The following example shows how crossroads 'throttles' SSH logins. Connections are accepted on port @@ -2715,13 +2776,13 @@ service Ssh { </pre> <p> -<a name="l64"></a> +<a name="l65"></a> <h2>6: Benchmarking</h2> <a name="benchmarking"></a>This section shows how crossroads affects the transmitting of HTML data when used as an intermediate 'station' through which all data travels. <p> -<a name="l65"></a> +<a name="l66"></a> <h3>6.1: Benchmark 1: Accessing a proxy via crossroads or directly</h3> <p> The benchmark was run on a system where the following was varied: @@ -2749,7 +2810,7 @@ service HttpProxy { </pre> <p> -<a name="l66"></a> +<a name="l67"></a> <strong>6.1.1: Results</strong> <p> The results of this test are that crossroads causes a negligible @@ -2772,7 +2833,7 @@ sys 0m0.230s </pre> <p> -<a name="l67"></a> +<a name="l68"></a> <strong>6.1.2: Discussion</strong> <p> The above shown results are quite favorable to crossroads. However, @@ -2804,7 +2865,7 @@ seldom in the real world: back end). Again, this processing time will weigh much heavier than the multiple read/writes.</ul> <p> -<a name="l68"></a> +<a name="l69"></a> <h3>6.2: Benchmark 2: Crossroads versus Linux Virtual Server (LVS)</h3> <p> LVS is a kernel-based balancer that acts like a masquerading @@ -2818,7 +2879,7 @@ LVS isn't aware of downtime of back ends (unless one implements an external heartbeat). Also, crossroads offers more complex balancing than LVS. <p> -<a name="l69"></a> +<a name="l70"></a> <strong>6.2.1: Environment</strong> <p> On the balancer, LVS was run on port 80, its forwarding set up for two @@ -2849,7 +2910,7 @@ service http { </pre> <p> -<a name="l70"></a> +<a name="l71"></a> <strong>6.2.2: Tests and results</strong> <p> In the first test, ports 80 and 81 on the balancer were 'bombed' with @@ -2928,9 +2989,9 @@ are shown in the below table: Again, the results show that crossroads performs just as effectively as LVS, even with large data chunks! <p> -<a name="l71"></a> +<a name="l72"></a> <h2>7: Compiling and Installing</h2> -<a name="compiling"></a><a name="l72"></a> +<a name="compiling"></a><a name="l73"></a> <h3>7.1: Prerequisites</h3> <p> The creation of crossroads requires: @@ -2947,7 +3008,7 @@ The creation of crossroads requires: Basically a Linux or Apple MacOSX box will do nicely. To compile and install crossroads, follow these steps. <p> -<a name="l73"></a> +<a name="l74"></a> <h3>7.2: Compiling and installing</h3> <p> <ul> @@ -3005,7 +3066,7 @@ crossroads, follow these steps. <p> </ul> <p> -<a name="l74"></a> +<a name="l75"></a> <h3>7.3: Configuring crossroads</h3> <p> Now that the binary is available on your system, you need to create a @@ -3054,13 +3115,13 @@ which crossroads daemons are running. Finally, the tailing of <code>/var/log/messages</code> shows what's going on -- especially if you have <code>verbosity true</code> statements in the configuration. <p> -<a name="l75"></a> +<a name="l76"></a> <h3>7.4: A boot script</h3> <p> Finally, you may want to create a boot-time startup script. The exact procedure depends on the used Unix flavor. <p> -<a name="l76"></a> +<a name="l77"></a> <strong>7.4.1: SysV Style Startup</strong> <p> On SysV style systems, there's a startup script directory @@ -3102,7 +3163,7 @@ If your runlevel is 5, then the right <code>cd</code> command is to <code>/etc/rc.d/rc5.d</code>. Alternatively, you can create the symlinks in both runlevel directories.</ul> <p> -<a name="l77"></a> +<a name="l78"></a> <strong>7.4.2: BSD Style Startup</strong> <p> On BSD style systems, daemons are booted directly from <code>/etc/rc</code> and diff --git a/doc/crossroads.man b/doc/crossroads.man @@ -1,6 +1,6 @@ -.TH "Crossroads 1\&.31" "2005, 2006, ff\&." +.TH "Crossroads 1\&.32" "2005, 2006, ff\&." .PP -.SH "Crossroads 1\&.31" +.SH "Crossroads 1\&.32" .SH "Karel Kubat" .SH "e-tunity" .SH "2005, 2006, ff\&." @@ -666,6 +666,13 @@ every time, unless it\&'s unavailable\&. In that case the second is taken, and so on\&. .IP .IP o +\f(CWdispatchmode byclientip\fP: The client\&'s IP address is +\&'hashed\&' into a number, which is used to pick a back end\&. The +same client IP address will therefore always be dispatched to +the same back end\&. When the back end of choice is down, +\f(CWdispatchmode byconnections\fP is used\&. +.IP +.IP o \f(CWdispatchmode externalhandler\fP \fIprogram arguments\fP: This is a special mode, where an external program is delegated the responsibility to say which back end should be used @@ -1725,7 +1732,7 @@ sub readlast() { return ($ret); } msg ("No last-used back end (yet)\en"); - return (undef); + return (undef); } # Write back the last used back end, reply to Crossroads and stop @@ -1803,8 +1810,14 @@ the script\&'s actions\&. .SH "Dispatching by the client IP address" .PP -The following example shows a useful real-life situation\&. The -situation is as follows: +The following example shows a useful real-life situation that +illustrates how dispatching by client IP address works\&. \fBNote that\fP +as of Crossroads 1\&.31, \f(CWdispatchmode byclientip\fP is implemented -- +so that the below description is somewhat superfluous\&. The code +snippets however can help you in modelling your own specific dispatch +modes, aided by external helpers\&. +.PP +The situation is as follows: .PP .IP o Crossroads is used as a single-address point to forward @@ -2075,17 +2088,46 @@ if ($action eq \&'dispatch\&') { .PP -.SH "5\&.3: HTTP Session Stickiness" +.SH "5\&.3: TCP Session Stickiness" + +.PP +If you need to make sure that a client that once gets dispatched to a +given back end keeps re-visiting the back end, then Crossroads offers +the dispatch mode \f(CWbyclientip\fP\&. This mode will only work when each +client is seen by Crossroads with its own specific IP address; ie\&., +this method won\&'t work when clients reach Crossroads through a +masquerading firewall (in which case all clients would be seen as +having the firewall\&'s IP address)\&. +.PP +The \f(CWdispatchmode roundrobin\fP works as follows: +.PP +.IP o +The client\&'s IP address is taken in its string +representation and \&'hashed\&' into a number\&. +.IP +.IP o +The number is brought back to the number of available +back ends (using a modulo-operation)\&. +.IP +.IP o +The result defines the back end of choice\&. +.PP +If the preferred back end is unavailable, then the action that +Crossroads takes is to dispatch as if \f(CWbyconnections\fP: of the +available back ends, the one with the least connections is taken\&. +.PP + +.SH "5\&.4: HTTP Session Stickiness" .PP This section focuses on HTTP session stickiness\&. This term refers to the ability of a balancer to route a conversation between browser and -a backend farm always to the same back end\&. In other words: once a -back end is selected by the balancer, it will remain the back end of -choice, even for subsequent connections\&. +a backend farm with webservers always to the same back end\&. In other +words: once a back end is selected by the balancer, it will remain the +back end of choice, even for subsequent connections\&. .PP -.SH "5\&.3\&.1: Don\&'t use stickiness!" +.SH "5\&.4\&.1: Don\&'t use stickiness!" .PP The rule of thumb as far as the balancer is concerned, is: \fBDo not @@ -2120,11 +2162,34 @@ servers such as Websphere can be configured to replicate session data between nodes\&. .PP -.SH "5\&.3\&.2: But if you must\&.\&." +.SH "5\&.4\&.2: But if you must\&.\&." .PP -However, if you \fBmust\fP use session stickiness, then proceed as -follows: +If you really need stickiness, think first whether you might use TCP +stickiness (using the client\&'s IP address to dispatch)\&. If you can, +then this is the preferred method, since Crossroads won\&'t have to +unpack TCP streams\&. Below is a short configuration example: +.PP +.nf +service www { + port 80; + type any; + revivinginterval 15; + dispatchmode byclientip; + + backend one { + server 10\&.1\&.1\&.100:80; + } + + backend two { + server 10\&.1\&.1\&.101:80; + } +} +.fi + +.PP +However, if you \fBmust\fP use HTTP-base session stickiness, then +proceed as follows: .PP .IP o At the level of a \f(CWservice\fP description, set the type to @@ -2178,7 +2243,7 @@ Note how the cookie names and values in the directives prerequisite for stickiness\&. .PP -.SH "5\&.4: Passing the client\&'s IP address" +.SH "5\&.5: Passing the client\&'s IP address" .PP Since Crossroads just shuttles bytes to and fro, meta-information of @@ -2210,7 +2275,7 @@ performance will be hampered -- all passing messages will have to be unpacked and analyzed\&. .PP -.SH "5\&.4\&.1: Sample Crossroads configuration" +.SH "5\&.5\&.1: Sample Crossroads configuration" .PP The below sample configuration shows two HTTP back ends that receive @@ -2238,7 +2303,7 @@ service www { .PP -.SH "5\&.4\&.2: Sample Apache configuration" +.SH "5\&.5\&.2: Sample Apache configuration" .PP The method by which each back end analyzes the header \f(CWX-Real-IP\fP @@ -2271,7 +2336,7 @@ LogFormat "%{X-Real-IP}i %l %u %t %D \e"%r\e" %>s %b" common .PP -.SH "5\&.5: Debugging network traffic" +.SH "5\&.6: Debugging network traffic" .PP Incase the traffic between @@ -2403,11 +2468,11 @@ analyze the output and to compute round trip times\&. Such scripts are not (yet) included in Crossroads\&. .PP -.SH "5\&.6: Limiting Access to Crossroads by Client IP Address" +.SH "5\&.7: Limiting Access to Crossroads by Client IP Address" .PP -.SH "5\&.6\&.1: General Examples" +.SH "5\&.7\&.1: General Examples" .PP The directives \f(CWallowfrom\fP, \f(CWdenyfrom\fP, \f(CWallowfile\fP and @@ -2445,7 +2510,7 @@ three network bytes (192, 168 and 1), and 24 bits (or 3 bytes) are relevant; so that the fourth network byte doesn\&'t matter\&. .PP -.SH "5\&.6\&.2: Using External Files" +.SH "5\&.7\&.2: Using External Files" .PP The directives \f(CWallowfile\fP and \f(CWdenyfile\fP allow you to specify IP @@ -2479,7 +2544,7 @@ is running, you may edit \f(CW/tmp/allow\&.txt\fP, and then issue \f(CWkillall reloaded\&. .PP -.SH "5\&.6\&.3: Mixing Directives" +.SH "5\&.7\&.3: Mixing Directives" .PP Crossroads allows to mix all directives in one service @@ -2549,7 +2614,7 @@ Crossroads doesn\&'t check for such configurations, which are syntactially correct, but make no semantic sense\&. .PP -.SH "5\&.7: Configuration examples" +.SH "5\&.8: Configuration examples" .PP As a general hint, use \f(CWcrossroads sampleconf\fP to view the most @@ -2557,7 +2622,7 @@ up-to-date examples of configurations\&. The description below shows a few examples too\&. .PP -.SH "5\&.7\&.1: A load balancer for three webserver back ends" +.SH "5\&.8\&.1: A load balancer for three webserver back ends" .PP The following configuration example binds crossroads to port 80 of the @@ -2687,7 +2752,7 @@ service www { .PP -.SH "5\&.7\&.2: An HTTP forwarder when travelling" +.SH "5\&.8\&.2: An HTTP forwarder when travelling" .PP As another example, here\&'s my \f(CWcrossroads\&.conf\fP that I use on my @@ -2782,7 +2847,7 @@ sshtunnel down\fP will \&'take down\&' the back end \f(CWSshTunnel\fP -- and will automatically cause crossroads to switch to \f(CWLocalSquid\fP\&. .PP -.SH "5\&.7\&.3: SSH login with enforced idle logout" +.SH "5\&.8\&.3: SSH login with enforced idle logout" .PP The following example shows how crossroads \&'throttles\&' SSH diff --git a/doc/crossroads.pdf b/doc/crossroads.pdf Binary files differ. diff --git a/doc/crossroads.yo b/doc/crossroads.yo @@ -9,9 +9,8 @@ abstract(Crossroads is a load balance and fail over utility for TCP more. Crossroads is service-independent: it is usable for HTTP/HTTPS, SSH, SMTP, DNS, etc. In the case of HTTP balancing, Crossroads can modify HTTP headers, e.g. to - provide 'session stickiness' for - back-end processes that need sessions, but aren't - session-aware of other back-ends.) + provide 'session stickiness' for back-end processes that need + sessions, but aren't session-aware of other back-ends.) article(Crossroads VER()) (Karel Kubat) (2005, 2006, ff.) diff --git a/doc/tips.yo b/doc/tips.yo @@ -330,7 +330,7 @@ sub readlast() { return ($ret); } msg ("No last-used back end (yet)\n"); - return (undef); + return (undef); } # Write back the last used back end, reply to Crossroads and stop @@ -403,8 +403,14 @@ itemization( subsubsubsect(Dispatching by the client IP address) -The following example shows a useful real-life situation. The -situation is as follows: +The following example shows a useful real-life situation that +illustrates how dispatching by client IP address works. bf(Note that) +as of Crossroads 1.31, tt(dispatchmode byclientip) is implemented -- +so that the below description is somewhat superfluous. The code +snippets however can help you in modelling your own specific dispatch +modes, aided by external helpers. + +The situation is as follows: itemization( it() Crossroads is used as a single-address point to forward @@ -662,14 +668,38 @@ if ($action eq 'dispatch') { exit (1); }) +subsect(TCP Session Stickiness) + +If you need to make sure that a client that once gets dispatched to a +given back end keeps re-visiting the back end, then Crossroads offers +the dispatch mode tt(byclientip). This mode will only work when each +client is seen by Crossroads with its own specific IP address; ie., +this method won't work when clients reach Crossroads through a +masquerading firewall (in which case all clients would be seen as +having the firewall's IP address). + +The tt(dispatchmode roundrobin) works as follows: + +itemization( + it() The client's IP address is taken in its string + representation and 'hashed' into a number. + + it() The number is brought back to the number of available + back ends (using a modulo-operation). + + it() The result defines the back end of choice.) + +If the preferred back end is unavailable, then the action that +Crossroads takes is to dispatch as if tt(byconnections): of the +available back ends, the one with the least connections is taken. subsect(HTTP Session Stickiness) This section focuses on HTTP session stickiness. This term refers to the ability of a balancer to route a conversation between browser and -a backend farm always to the same back end. In other words: once a -back end is selected by the balancer, it will remain the back end of -choice, even for subsequent connections. +a backend farm with webservers always to the same back end. In other +words: once a back end is selected by the balancer, it will remain the +back end of choice, even for subsequent connections. subsubsect(Don't use stickiness!) @@ -704,8 +734,30 @@ between nodes. subsubsect(But if you must..) -However, if you bf(must) use session stickiness, then proceed as -follows: +If you really need stickiness, think first whether you might use TCP +stickiness (using the client's IP address to dispatch). If you can, +then this is the preferred method, since Crossroads won't have to +unpack TCP streams. Below is a short configuration example: + +verb(\ +service www { + port 80; + type any; + revivinginterval 15; + dispatchmode byclientip; + + backend one { + server 10.1.1.100:80; + } + + backend two { + server 10.1.1.101:80; + } +}) + + +However, if you bf(must) use HTTP-base session stickiness, then +proceed as follows: itemization( it() At the level of a tt(service) description, set the type to diff --git a/etc/Makefile.def b/etc/Makefile.def @@ -3,7 +3,7 @@ # Versioning. This defines the overall version ID and must match the topmost # entry in the ChangeLog. -VER = 1.31 +VER = 1.32 # Default config DEFAULT_CONF = /etc/crossroads.conf diff --git a/src/allocreporter.c b/src/allocreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/ansistamp.c b/src/ansistamp.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/backendavailable.c b/src/backendavailable.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/backendconnect.c b/src/backendconnect.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/backendcount.c b/src/backendcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/choosebackend.c b/src/choosebackend.c @@ -1,12 +1,12 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ #include "crossroads.h" void choose_backend () { - int backends[MAX_BACKEND], nbackends = 0, i, j, k, + int backends[MAX_BACKEND], nbackends = 0, h, i, j, k, target_set = 0, flat_weights = 1, weights[MAX_BACKEND], *sel_weights, tot_weights, lo_val, hi_val, done; double values [MAX_BACKEND], nbest; @@ -28,6 +28,25 @@ void choose_backend () { return; } + /* Incase of dispatching by client IP, check that the back end + * is up. If it is, take that target. */ + if (activeservice->dispatchtype == ds_byclientip) { + h = hashpjw (client_ip) % activeservice->nbackend; + msg ("Service %s: Client IP %s hashed to back end index %d", + activeservice->name, client_ip, h); + if (servicereport->backendstate[h].avail == st_available && + (activeservice->backend[h].maxconnections == 0 || + activeservice->backend[h].maxconnections > + servicereport->backendstate[h].nclients)) { + msg ("Service %s: Hashed back end %d is acceptable", + activeservice->name, h); + current_backend = h; + return; + } else + msg ("Service %s: Hashed back end %d is not available, " + "re-dispatching", activeservice->name, h); + } + /* Populate the array of selectable backends. */ for (i = 0; i < activeservice->nbackend; i++) { /* Backend i is a candidate if: @@ -283,7 +302,9 @@ void choose_backend () { return; case ds_byconnections: - /* Get the weighing values. */ + case ds_byclientip: + /* Note: this serves byconnections dispatching, plus byclientip + * when the actual back end has gone down. */ for (i = 0; i < nbackends; i++) { values[i] = servicereport->backendstate[backends[i]].nclients * diff --git a/src/configtest.c b/src/configtest.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/copysockets.c b/src/copysockets.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/createcommandlinespace.c b/src/createcommandlinespace.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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.31, a load balancer and fail over + * This file is part of Crosroads 1.32, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -114,6 +114,7 @@ typedef enum { /* Dispatching types */ ds_byduration, ds_byorder, ds_byconnections, + ds_byclientip, ds_externalhandler } Dispatchtype; @@ -299,6 +300,7 @@ extern void decr_client_count (void); extern void dealloc_reporter (Service *s); extern void error (char const *fmt, ...); extern int fork_tcp_servicer (int to_backend); +extern int hashpjw (char const *s); extern void http_copy (HttpHeader *h, int src_sock, int dst_sock, CopyDirection dir); extern void http_error (int clientsock); diff --git a/src/deallocreporter.c b/src/deallocreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/decrclientcount.c b/src/decrclientcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/error.c b/src/error.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/forktcpservicer.c b/src/forktcpservicer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpcopy.c b/src/httpcopy.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httperror.c b/src/httperror.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheaderaddheader.c b/src/httpheaderaddheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheaderappendheader.c b/src/httpheaderappendheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheaderconnectiontype.c b/src/httpheaderconnectiontype.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheaderfree.c b/src/httpheaderfree.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheaderhascookie.c b/src/httpheaderhascookie.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheaderhttpver.c b/src/httpheaderhttpver.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheadernew.c b/src/httpheadernew.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheaderread.c b/src/httpheaderread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheaderremoveheader.c b/src/httpheaderremoveheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheadersetheader.c b/src/httpheadersetheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheaderval.c b/src/httpheaderval.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpheaderwrite.c b/src/httpheaderwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpinsertheader.c b/src/httpinsertheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpserve.c b/src/httpserve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpserversocket.c b/src/httpserversocket.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/httpwrite.c b/src/httpwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/incrclientcount.c b/src/incrclientcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/initsockaddr.c b/src/initsockaddr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/interrupt.c b/src/interrupt.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/ipfaddallow.c b/src/ipfaddallow.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/ipfadddeny.c b/src/ipfadddeny.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/ipfallowed.c b/src/ipfallowed.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/ipfdenied.c b/src/ipfdenied.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/ipfloadfile.c b/src/ipfloadfile.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/ipfmatch.c b/src/ipfmatch.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/ipfparse.c b/src/ipfparse.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/ishexdigit.c b/src/ishexdigit.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/isspace.c b/src/isspace.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/lexer.c b/src/lexer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -288,55 +288,55 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 64 -#define YY_END_OF_BUFFER 65 -static yyconst short int yy_accept[404] = +#define YY_NUM_RULES 65 +#define YY_END_OF_BUFFER 66 +static yyconst short int yy_accept[411] = { 0, - 0, 0, 0, 0, 0, 0, 65, 53, 51, 52, - 53, 53, 50, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 62, 63, 61, 62, 62, 60, 57, 56, - 57, 51, 0, 1, 54, 0, 50, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 48, 49, 47, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 0, 58, 0, 59, 55, 0, 2, 49, 49, - 27, 49, 49, 49, 49, 49, 49, 49, 49, 49, - - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 47, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 29, 49, 49, 49, 49, 6, - 5, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 26, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 14, 49, 49, - 49, 49, 49, 35, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - - 49, 49, 49, 49, 49, 49, 4, 49, 49, 49, - 20, 49, 49, 49, 49, 49, 49, 49, 34, 49, - 18, 49, 49, 15, 49, 49, 49, 7, 49, 49, - 49, 49, 49, 13, 49, 49, 49, 49, 49, 49, - 8, 9, 49, 49, 21, 49, 49, 49, 49, 49, - 49, 49, 33, 49, 49, 3, 49, 49, 49, 49, - 49, 49, 49, 10, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 46, 44, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 45, 43, 49, 49, 49, 49, 49, 49, - - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 19, 49, 49, - 49, 49, 49, 49, 17, 49, 49, 49, 28, 49, - 31, 49, 49, 49, 49, 49, 49, 49, 49, 32, - 49, 49, 49, 49, 49, 49, 49, 24, 49, 49, - 49, 49, 49, 49, 16, 49, 49, 49, 49, 49, - 36, 49, 49, 49, 49, 49, 22, 49, 49, 49, - 49, 49, 49, 30, 49, 49, 49, 49, 49, 49, - 12, 49, 49, 49, 37, 40, 49, 49, 49, 23, - 49, 38, 41, 49, 49, 49, 25, 49, 49, 11, - - 39, 42, 0 + 0, 0, 0, 0, 0, 0, 66, 54, 52, 53, + 54, 54, 51, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 63, 64, 62, 63, 63, 61, 58, 57, + 58, 52, 0, 1, 55, 0, 51, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 49, 50, 48, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 0, 59, 0, 60, 56, 0, 2, 50, 50, + 28, 50, 50, 50, 50, 50, 50, 50, 50, 50, + + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 48, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 30, 50, 50, 50, 50, + 6, 5, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 27, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 14, + 50, 50, 50, 50, 50, 36, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + + 50, 50, 50, 50, 50, 50, 50, 50, 4, 50, + 50, 50, 50, 20, 50, 50, 50, 50, 50, 50, + 50, 35, 50, 18, 50, 50, 15, 50, 50, 50, + 7, 50, 50, 50, 50, 50, 13, 50, 50, 50, + 50, 50, 50, 8, 9, 50, 50, 50, 21, 50, + 50, 50, 50, 50, 50, 50, 34, 50, 50, 3, + 50, 50, 50, 50, 50, 50, 50, 10, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 47, + 45, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 46, 44, 50, + + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 24, 50, 19, 50, 50, 50, 50, 50, + 50, 17, 50, 50, 50, 29, 50, 32, 50, 50, + 50, 50, 50, 50, 50, 50, 33, 50, 50, 50, + 50, 50, 50, 50, 25, 50, 50, 50, 50, 50, + 50, 16, 50, 50, 50, 50, 50, 37, 50, 50, + 50, 50, 50, 22, 50, 50, 50, 50, 50, 50, + 31, 50, 50, 50, 50, 50, 50, 12, 50, 50, + 50, 38, 41, 50, 50, 50, 23, 50, 39, 42, + + 50, 50, 50, 26, 50, 50, 11, 40, 43, 0 } ; static yyconst int yy_ec[256] = @@ -379,212 +379,216 @@ static yyconst int yy_meta[37] = 2, 2, 2, 2, 2, 2 } ; -static yyconst short int yy_base[411] = +static yyconst short int yy_base[418] = { 0, - 0, 0, 34, 39, 44, 45, 432, 433, 47, 433, - 428, 46, 420, 0, 40, 45, 403, 40, 394, 414, - 396, 412, 398, 44, 397, 47, 55, 54, 393, 404, - 403, 402, 433, 433, 433, 413, 410, 433, 433, 433, - 407, 66, 412, 433, 433, 411, 403, 0, 396, 388, - 375, 382, 393, 382, 62, 381, 68, 376, 380, 373, - 379, 371, 366, 0, 381, 69, 381, 369, 371, 363, - 363, 51, 369, 371, 363, 71, 363, 372, 360, 366, - 357, 380, 433, 377, 433, 433, 380, 433, 75, 356, - 0, 364, 358, 363, 352, 346, 348, 354, 349, 360, - - 337, 344, 343, 352, 339, 340, 351, 340, 351, 333, - 334, 331, 344, 338, 333, 325, 77, 334, 340, 328, - 335, 335, 334, 322, 335, 329, 0, 324, 329, 312, - 319, 77, 313, 317, 313, 324, 303, 321, 302, 318, - 322, 304, 305, 315, 0, 305, 314, 308, 315, 0, - 0, 301, 294, 309, 78, 301, 306, 305, 299, 289, - 301, 0, 305, 291, 296, 294, 286, 295, 296, 286, - 284, 283, 283, 294, 289, 288, 289, 0, 75, 273, - 274, 276, 275, 0, 276, 270, 273, 275, 267, 266, - 278, 271, 263, 255, 254, 269, 266, 271, 256, 254, - - 266, 250, 80, 82, 265, 261, 0, 262, 248, 249, - 0, 246, 252, 248, 258, 259, 258, 245, 0, 239, - 0, 243, 241, 0, 249, 248, 232, 0, 90, 243, - 247, 246, 92, 0, 235, 242, 235, 231, 233, 238, - 0, 0, 239, 232, 0, 231, 234, 226, 229, 230, - 224, 229, 0, 226, 230, 0, 218, 225, 215, 210, - 212, 215, 211, 0, 206, 205, 206, 216, 208, 210, - 202, 199, 202, 201, 0, 0, 202, 207, 204, 208, - 201, 200, 190, 191, 192, 187, 185, 189, 183, 178, - 192, 191, 0, 0, 193, 177, 187, 182, 181, 179, - - 183, 190, 172, 176, 175, 179, 178, 175, 169, 165, - 175, 168, 175, 174, 165, 172, 162, 0, 157, 170, - 170, 159, 162, 152, 0, 164, 163, 158, 0, 155, - 0, 147, 163, 162, 144, 145, 147, 150, 153, 0, - 153, 142, 150, 153, 152, 147, 137, 0, 146, 145, - 140, 139, 129, 133, 0, 133, 130, 126, 137, 136, - 0, 132, 133, 132, 131, 130, 0, 129, 128, 115, - 111, 125, 124, 0, 112, 111, 125, 124, 110, 107, - 0, 121, 105, 104, 0, 0, 115, 114, 98, 0, - 105, 0, 0, 110, 109, 82, 0, 79, 31, 0, - - 0, 0, 433, 113, 115, 117, 38, 119, 121, 123 + 0, 0, 34, 39, 44, 45, 439, 440, 47, 440, + 435, 46, 427, 0, 40, 45, 410, 40, 401, 421, + 403, 419, 405, 44, 404, 47, 55, 54, 400, 411, + 410, 409, 440, 440, 440, 420, 417, 440, 440, 440, + 414, 66, 419, 440, 440, 418, 410, 0, 403, 395, + 382, 389, 400, 389, 62, 388, 68, 383, 387, 380, + 386, 378, 373, 0, 388, 69, 388, 376, 378, 370, + 370, 51, 376, 378, 370, 71, 370, 379, 367, 373, + 364, 387, 440, 384, 440, 440, 387, 440, 75, 363, + 0, 371, 365, 370, 69, 354, 356, 362, 357, 368, + + 345, 352, 351, 360, 347, 348, 359, 348, 359, 341, + 342, 339, 352, 346, 341, 333, 79, 342, 348, 336, + 343, 343, 342, 330, 343, 337, 0, 332, 337, 320, + 327, 80, 321, 329, 324, 320, 331, 310, 328, 309, + 325, 329, 311, 312, 322, 0, 312, 321, 315, 322, + 0, 0, 308, 301, 316, 79, 308, 313, 312, 306, + 296, 308, 0, 312, 298, 303, 301, 293, 302, 303, + 293, 291, 290, 298, 289, 300, 295, 294, 295, 0, + 78, 279, 280, 282, 281, 0, 282, 276, 279, 281, + 273, 272, 284, 277, 269, 261, 260, 275, 272, 277, + + 262, 260, 272, 256, 84, 86, 271, 267, 0, 260, + 267, 253, 254, 0, 251, 257, 253, 263, 264, 263, + 250, 0, 244, 0, 248, 246, 0, 254, 253, 237, + 0, 94, 248, 252, 251, 90, 0, 240, 247, 240, + 236, 238, 243, 0, 0, 229, 243, 236, 0, 235, + 238, 230, 233, 234, 228, 233, 0, 230, 234, 0, + 222, 229, 219, 214, 216, 219, 215, 0, 210, 209, + 210, 220, 212, 214, 206, 212, 202, 205, 204, 0, + 0, 205, 210, 207, 211, 204, 203, 193, 194, 195, + 190, 188, 192, 186, 181, 195, 194, 0, 0, 196, + + 180, 184, 189, 184, 183, 181, 185, 192, 174, 178, + 177, 181, 180, 177, 171, 167, 177, 170, 177, 176, + 167, 174, 0, 164, 0, 159, 172, 172, 161, 164, + 154, 0, 166, 165, 160, 0, 157, 0, 149, 165, + 164, 146, 147, 149, 152, 155, 0, 155, 144, 152, + 155, 154, 149, 139, 0, 148, 147, 142, 141, 131, + 135, 0, 135, 132, 128, 139, 138, 0, 134, 135, + 134, 133, 132, 0, 131, 130, 117, 113, 127, 126, + 0, 114, 113, 127, 126, 112, 109, 0, 123, 107, + 106, 0, 0, 117, 116, 100, 0, 107, 0, 0, + + 112, 111, 83, 0, 82, 31, 0, 0, 0, 440, + 115, 117, 119, 38, 121, 123, 125 } ; -static yyconst short int yy_def[411] = +static yyconst short int yy_def[418] = { 0, - 403, 1, 404, 404, 405, 405, 403, 403, 403, 403, - 406, 403, 403, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 403, 403, 403, 408, 409, 403, 403, 403, - 403, 403, 406, 403, 403, 410, 403, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 408, 403, 409, 403, 403, 410, 403, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - - 407, 407, 0, 403, 403, 403, 403, 403, 403, 403 + 410, 1, 411, 411, 412, 412, 410, 410, 410, 410, + 413, 410, 410, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 410, 410, 410, 415, 416, 410, 410, 410, + 410, 410, 413, 410, 410, 417, 410, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 415, 410, 416, 410, 410, 417, 410, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + + 414, 414, 414, 414, 414, 414, 414, 414, 414, 0, + 410, 410, 410, 410, 410, 410, 410 } ; -static yyconst short int yy_nxt[470] = +static yyconst short int yy_nxt[477] = { 0, 8, 9, 10, 9, 8, 11, 8, 8, 12, 13, 8, 14, 15, 16, 17, 18, 19, 20, 14, 21, 14, 14, 14, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14, 32, 14, 34, 35, 36, 48, 37, 34, 35, 36, 38, 37, 40, 40, 42, 38, - 42, 41, 41, 45, 46, 49, 57, 53, 402, 69, + 42, 41, 41, 45, 46, 49, 57, 53, 409, 69, 58, 65, 50, 70, 51, 54, 52, 42, 66, 42, 59, 72, 71, 75, 73, 67, 95, 96, 116, 55, 117, 76, 100, 121, 74, 108, 109, 97, 77, 128, - 98, 156, 101, 170, 190, 213, 239, 110, 191, 171, - - 237, 122, 214, 129, 259, 157, 401, 238, 264, 260, - 240, 400, 265, 33, 33, 39, 39, 43, 43, 82, - 82, 84, 84, 87, 87, 399, 398, 397, 396, 395, - 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, - 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, - 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, - 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, - 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, - 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, - 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, - - 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, - 314, 313, 264, 312, 311, 310, 309, 308, 307, 306, - 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, - 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, - 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, - 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, - 263, 262, 261, 258, 257, 256, 255, 254, 253, 252, - 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, - 241, 236, 235, 234, 233, 232, 231, 230, 229, 228, - 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, - - 217, 216, 215, 212, 211, 210, 209, 208, 207, 206, - 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, - 195, 194, 193, 192, 189, 188, 187, 186, 185, 184, - 183, 64, 182, 181, 180, 179, 178, 177, 176, 175, - 174, 173, 172, 169, 168, 167, 166, 165, 164, 163, - 162, 127, 161, 160, 159, 158, 155, 154, 153, 152, - 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, - 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, - 131, 130, 88, 85, 83, 127, 126, 125, 124, 123, - 120, 119, 118, 115, 114, 113, 112, 111, 64, 107, - - 106, 105, 104, 103, 102, 99, 94, 93, 92, 91, - 90, 89, 47, 88, 44, 86, 85, 83, 81, 80, - 79, 78, 68, 64, 63, 62, 61, 60, 56, 47, - 44, 403, 7, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403 + 98, 134, 101, 157, 135, 192, 171, 110, 216, 193, + + 242, 122, 172, 129, 240, 217, 268, 158, 263, 408, + 269, 241, 407, 264, 243, 33, 33, 39, 39, 43, + 43, 82, 82, 84, 84, 87, 87, 406, 405, 404, + 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, + 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, + 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, + 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, + 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, + 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, + 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, + + 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, + 323, 322, 321, 320, 319, 268, 318, 317, 316, 315, + 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, + 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, + 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, + 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, + 274, 273, 272, 271, 270, 267, 266, 265, 262, 261, + 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, + 250, 249, 248, 247, 246, 245, 244, 239, 238, 237, + 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, + + 226, 225, 224, 223, 222, 221, 220, 219, 218, 215, + 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, + 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, + 194, 191, 190, 189, 188, 187, 186, 185, 64, 184, + 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, + 173, 170, 169, 168, 167, 166, 165, 164, 163, 127, + 162, 161, 160, 159, 156, 155, 154, 153, 152, 151, + 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, + 140, 139, 138, 137, 136, 133, 132, 131, 130, 88, + 85, 83, 127, 126, 125, 124, 123, 120, 119, 118, + + 115, 114, 113, 112, 111, 64, 107, 106, 105, 104, + 103, 102, 99, 94, 93, 92, 91, 90, 89, 47, + 88, 44, 86, 85, 83, 81, 80, 79, 78, 68, + 64, 63, 62, 61, 60, 56, 47, 44, 410, 7, + 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, + 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, + 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, + 410, 410, 410, 410, 410, 410 } ; -static yyconst short int yy_chk[470] = +static yyconst short int yy_chk[477] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 407, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 414, 3, 4, 4, 4, 3, 4, 5, 6, 9, 4, - 9, 5, 6, 12, 12, 15, 18, 16, 399, 26, + 9, 5, 6, 12, 12, 15, 18, 16, 406, 26, 18, 24, 15, 26, 15, 16, 15, 42, 24, 42, 18, 27, 26, 28, 27, 24, 55, 55, 72, 16, 72, 28, 57, 76, 27, 66, 66, 55, 28, 89, - 55, 117, 57, 132, 155, 179, 204, 66, 155, 132, - - 203, 76, 179, 89, 229, 117, 398, 203, 233, 229, - 204, 396, 233, 404, 404, 405, 405, 406, 406, 408, - 408, 409, 409, 410, 410, 395, 394, 391, 389, 388, - 387, 384, 383, 382, 380, 379, 378, 377, 376, 375, - 373, 372, 371, 370, 369, 368, 366, 365, 364, 363, - 362, 360, 359, 358, 357, 356, 354, 353, 352, 351, - 350, 349, 347, 346, 345, 344, 343, 342, 341, 339, - 338, 337, 336, 335, 334, 333, 332, 330, 328, 327, - 326, 324, 323, 322, 321, 320, 319, 317, 316, 315, - 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, - - 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, - 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, - 282, 281, 280, 279, 278, 277, 274, 273, 272, 271, - 270, 269, 268, 267, 266, 265, 263, 262, 261, 260, - 259, 258, 257, 255, 254, 252, 251, 250, 249, 248, - 247, 246, 244, 243, 240, 239, 238, 237, 236, 235, - 232, 231, 230, 227, 226, 225, 223, 222, 220, 218, - 217, 216, 215, 214, 213, 212, 210, 209, 208, 206, - 205, 202, 201, 200, 199, 198, 197, 196, 195, 194, - 193, 192, 191, 190, 189, 188, 187, 186, 185, 183, - - 182, 181, 180, 177, 176, 175, 174, 173, 172, 171, - 170, 169, 168, 167, 166, 165, 164, 163, 161, 160, - 159, 158, 157, 156, 154, 153, 152, 149, 148, 147, - 146, 144, 143, 142, 141, 140, 139, 138, 137, 136, - 135, 134, 133, 131, 130, 129, 128, 126, 125, 124, - 123, 122, 121, 120, 119, 118, 116, 115, 114, 113, - 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, - 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, - 92, 90, 87, 84, 82, 81, 80, 79, 78, 77, - 75, 74, 73, 71, 70, 69, 68, 67, 65, 63, - - 62, 61, 60, 59, 58, 56, 54, 53, 52, 51, - 50, 49, 47, 46, 43, 41, 37, 36, 32, 31, - 30, 29, 25, 23, 22, 21, 20, 19, 17, 13, - 11, 7, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403 + 55, 95, 57, 117, 95, 156, 132, 66, 181, 156, + + 206, 76, 132, 89, 205, 181, 236, 117, 232, 405, + 236, 205, 403, 232, 206, 411, 411, 412, 412, 413, + 413, 415, 415, 416, 416, 417, 417, 402, 401, 398, + 396, 395, 394, 391, 390, 389, 387, 386, 385, 384, + 383, 382, 380, 379, 378, 377, 376, 375, 373, 372, + 371, 370, 369, 367, 366, 365, 364, 363, 361, 360, + 359, 358, 357, 356, 354, 353, 352, 351, 350, 349, + 348, 346, 345, 344, 343, 342, 341, 340, 339, 337, + 335, 334, 333, 331, 330, 329, 328, 327, 326, 324, + 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, + + 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, + 302, 301, 300, 297, 296, 295, 294, 293, 292, 291, + 290, 289, 288, 287, 286, 285, 284, 283, 282, 279, + 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, + 267, 266, 265, 264, 263, 262, 261, 259, 258, 256, + 255, 254, 253, 252, 251, 250, 248, 247, 246, 243, + 242, 241, 240, 239, 238, 235, 234, 233, 230, 229, + 228, 226, 225, 223, 221, 220, 219, 218, 217, 216, + 215, 213, 212, 211, 210, 208, 207, 204, 203, 202, + 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, + + 191, 190, 189, 188, 187, 185, 184, 183, 182, 179, + 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, + 168, 167, 166, 165, 164, 162, 161, 160, 159, 158, + 157, 155, 154, 153, 150, 149, 148, 147, 145, 144, + 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, + 133, 131, 130, 129, 128, 126, 125, 124, 123, 122, + 121, 120, 119, 118, 116, 115, 114, 113, 112, 111, + 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, + 100, 99, 98, 97, 96, 94, 93, 92, 90, 87, + 84, 82, 81, 80, 79, 78, 77, 75, 74, 73, + + 71, 70, 69, 68, 67, 65, 63, 62, 61, 60, + 59, 58, 56, 54, 53, 52, 51, 50, 49, 47, + 46, 43, 41, 37, 36, 32, 31, 30, 29, 25, + 23, 22, 21, 20, 19, 17, 13, 11, 7, 410, + 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, + 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, + 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, + 410, 410, 410, 410, 410, 410 } ; static yy_state_type yy_last_accepting_state; @@ -625,7 +629,7 @@ static int yywrap () { #define stringstate 1 #define commentstate 2 -#line 624 "lexer.c" +#line 628 "lexer.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -779,7 +783,7 @@ YY_DECL #line 27 "lexer.l" -#line 778 "lexer.c" +#line 782 "lexer.c" if ( yy_init ) { @@ -830,13 +834,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 404 ) + if ( yy_current_state >= 411 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 433 ); + while ( yy_base[yy_current_state] != 440 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1059,6 +1063,14 @@ case 24: YY_RULE_SETUP #line 153 "lexer.l" { + lmsg ("byclientip"); + return (BYCLIENTIP); +} + YY_BREAK +case 25: +YY_RULE_SETUP +#line 158 "lexer.l" +{ lmsg ("useraccount"); BEGIN (stringstate); free (laststring); @@ -1066,33 +1078,33 @@ YY_RULE_SETUP return (USERACCOUNT); } YY_BREAK -case 25: +case 26: YY_RULE_SETUP -#line 161 "lexer.l" +#line 166 "lexer.l" { lmsg ("revivinginterval"); return (REVIVINGINTERVAL); } YY_BREAK -case 26: +case 27: YY_RULE_SETUP -#line 166 "lexer.l" +#line 171 "lexer.l" { lmsg ("type"); return (TYPE); } YY_BREAK -case 27: +case 28: YY_RULE_SETUP -#line 171 "lexer.l" +#line 176 "lexer.l" { lmsg ("any"); return (ANY); } YY_BREAK -case 28: +case 29: YY_RULE_SETUP -#line 176 "lexer.l" +#line 181 "lexer.l" { lmsg ("stickyhttp"); warning ("The 'stickyhttp protocol is obsolte.\n" @@ -1100,17 +1112,17 @@ YY_RULE_SETUP return (HTTP); } YY_BREAK -case 29: +case 30: YY_RULE_SETUP -#line 183 "lexer.l" +#line 188 "lexer.l" { lmsg ("http"); return (HTTP); } YY_BREAK -case 30: +case 31: YY_RULE_SETUP -#line 188 "lexer.l" +#line 193 "lexer.l" { lmsg ("throughputlog"); BEGIN (stringstate); @@ -1119,9 +1131,9 @@ YY_RULE_SETUP return (THROUGHPUTLOG); } YY_BREAK -case 31: +case 32: YY_RULE_SETUP -#line 196 "lexer.l" +#line 201 "lexer.l" { lmsg ("trafficlog"); BEGIN (stringstate); @@ -1130,9 +1142,9 @@ YY_RULE_SETUP return (TRAFFICLOG); } YY_BREAK -case 32: +case 33: YY_RULE_SETUP -#line 204 "lexer.l" +#line 209 "lexer.l" { lmsg ("dumptraffic"); warning ("The 'dumptraffic' statement is obsolete.\n" @@ -1143,9 +1155,9 @@ YY_RULE_SETUP return (TRAFFICLOG); } YY_BREAK -case 33: +case 34: YY_RULE_SETUP -#line 214 "lexer.l" +#line 219 "lexer.l" { lmsg ("onstart"); BEGIN (stringstate); @@ -1154,9 +1166,9 @@ YY_RULE_SETUP return (ONSTART); } YY_BREAK -case 34: +case 35: YY_RULE_SETUP -#line 222 "lexer.l" +#line 227 "lexer.l" { lmsg ("onfail"); BEGIN (stringstate); @@ -1165,9 +1177,9 @@ YY_RULE_SETUP return (ONFAIL); } YY_BREAK -case 35: +case 36: YY_RULE_SETUP -#line 230 "lexer.l" +#line 235 "lexer.l" { lmsg ("onend"); BEGIN (stringstate); @@ -1176,9 +1188,9 @@ YY_RULE_SETUP return (ONEND); } YY_BREAK -case 36: +case 37: YY_RULE_SETUP -#line 238 "lexer.l" +#line 243 "lexer.l" { lmsg ("stickycookie"); BEGIN (stringstate); @@ -1187,9 +1199,9 @@ YY_RULE_SETUP return (STICKYCOOKIE); } YY_BREAK -case 37: +case 38: YY_RULE_SETUP -#line 246 "lexer.l" +#line 251 "lexer.l" { lmsg ("addclientheader"); BEGIN (stringstate); @@ -1198,9 +1210,9 @@ YY_RULE_SETUP return (ADDCLIENTHEADER); } YY_BREAK -case 38: +case 39: YY_RULE_SETUP -#line 254 "lexer.l" +#line 259 "lexer.l" { lmsg ("setclientheader"); BEGIN (stringstate); @@ -1209,9 +1221,9 @@ YY_RULE_SETUP return (SETCLIENTHEADER); } YY_BREAK -case 39: +case 40: YY_RULE_SETUP -#line 262 "lexer.l" +#line 267 "lexer.l" { lmsg ("appendclientheader"); BEGIN (stringstate); @@ -1220,9 +1232,9 @@ YY_RULE_SETUP return (APPENDCLIENTHEADER); } YY_BREAK -case 40: +case 41: YY_RULE_SETUP -#line 270 "lexer.l" +#line 275 "lexer.l" { lmsg ("addserverheader"); BEGIN (stringstate); @@ -1231,9 +1243,9 @@ YY_RULE_SETUP return (ADDSERVERHEADER); } YY_BREAK -case 41: +case 42: YY_RULE_SETUP -#line 278 "lexer.l" +#line 283 "lexer.l" { lmsg ("setserverheader"); BEGIN (stringstate); @@ -1242,9 +1254,9 @@ YY_RULE_SETUP return (SETSERVERHEADER); } YY_BREAK -case 42: +case 43: YY_RULE_SETUP -#line 286 "lexer.l" +#line 291 "lexer.l" { lmsg ("appendserverheader"); BEGIN (stringstate); @@ -1253,9 +1265,9 @@ YY_RULE_SETUP return (APPENDSERVERHEADER); } YY_BREAK -case 43: +case 44: YY_RULE_SETUP -#line 294 "lexer.l" +#line 299 "lexer.l" { lmsg ("allowfrom"); BEGIN (stringstate); @@ -1264,9 +1276,9 @@ YY_RULE_SETUP return (ALLOWFROM); } YY_BREAK -case 44: +case 45: YY_RULE_SETUP -#line 302 "lexer.l" +#line 307 "lexer.l" { lmsg ("denyfrom"); BEGIN (stringstate); @@ -1275,9 +1287,9 @@ YY_RULE_SETUP return (DENYFROM); } YY_BREAK -case 45: +case 46: YY_RULE_SETUP -#line 310 "lexer.l" +#line 315 "lexer.l" { lmsg ("allowfile"); BEGIN (stringstate); @@ -1286,9 +1298,9 @@ YY_RULE_SETUP return (ALLOWFILE); } YY_BREAK -case 46: +case 47: YY_RULE_SETUP -#line 318 "lexer.l" +#line 323 "lexer.l" { lmsg ("denyfile"); BEGIN (stringstate); @@ -1297,110 +1309,110 @@ YY_RULE_SETUP return (DENYFILE); } YY_BREAK -case 47: +case 48: YY_RULE_SETUP -#line 326 "lexer.l" +#line 331 "lexer.l" { lmsg ("on"); return (ON); } YY_BREAK -case 48: +case 49: YY_RULE_SETUP -#line 331 "lexer.l" +#line 336 "lexer.l" { lmsg ("off"); return (OFF); } YY_BREAK -case 49: +case 50: YY_RULE_SETUP -#line 336 "lexer.l" +#line 341 "lexer.l" { llmsg ("identifier", yytext); return (IDENTIFIER); } YY_BREAK -case 50: +case 51: YY_RULE_SETUP -#line 341 "lexer.l" +#line 346 "lexer.l" { llmsg ("number", yytext); return (NUMBER); } YY_BREAK -case 51: +case 52: YY_RULE_SETUP -#line 346 "lexer.l" +#line 351 "lexer.l" { lmsg ("space(s)"); } YY_BREAK -case 52: +case 53: YY_RULE_SETUP -#line 350 "lexer.l" +#line 355 "lexer.l" { lmsg ("newline"); yylineno++; } YY_BREAK -case 53: +case 54: YY_RULE_SETUP -#line 355 "lexer.l" +#line 360 "lexer.l" { llmsg ("lone char", yytext); return (*yytext); } YY_BREAK -case 54: +case 55: YY_RULE_SETUP -#line 360 "lexer.l" +#line 365 "lexer.l" { lmsg ("C-comment starts"); BEGIN(commentstate); } YY_BREAK -case 55: +case 56: YY_RULE_SETUP -#line 364 "lexer.l" +#line 369 "lexer.l" { lmsg ("C-comment ends"); BEGIN(0); } YY_BREAK -case 56: +case 57: YY_RULE_SETUP -#line 368 "lexer.l" +#line 373 "lexer.l" { yylineno++; } YY_BREAK -case 57: +case 58: YY_RULE_SETUP -#line 371 "lexer.l" +#line 376 "lexer.l" ; YY_BREAK -case 58: +case 59: YY_RULE_SETUP -#line 373 "lexer.l" +#line 378 "lexer.l" { llmsg ("string part", yytext); laststring = xstrcat (laststring, yytext + 1); laststring[strlen(laststring) - 1] = 0; } YY_BREAK -case 59: +case 60: YY_RULE_SETUP -#line 378 "lexer.l" +#line 383 "lexer.l" { llmsg ("string part", yytext); laststring = xstrcat (laststring, yytext + 1); laststring[strlen(laststring) - 1] = 0; } YY_BREAK -case 60: +case 61: YY_RULE_SETUP -#line 383 "lexer.l" +#line 388 "lexer.l" { BEGIN (0); unput (';'); @@ -1408,9 +1420,9 @@ YY_RULE_SETUP return (STRING); } YY_BREAK -case 61: +case 62: YY_RULE_SETUP -#line 389 "lexer.l" +#line 394 "lexer.l" { if (laststring) { laststring = xstrcat (laststring, yytext); @@ -1418,17 +1430,17 @@ YY_RULE_SETUP } } YY_BREAK -case 62: +case 63: YY_RULE_SETUP -#line 395 "lexer.l" +#line 400 "lexer.l" { llmsg ("string part", yytext); laststring = xstrcat (laststring, yytext); } YY_BREAK -case 63: +case 64: YY_RULE_SETUP -#line 399 "lexer.l" +#line 404 "lexer.l" { if (laststring) { laststring = xstrcat (laststring, " "); @@ -1437,12 +1449,12 @@ YY_RULE_SETUP yylineno++; } YY_BREAK -case 64: +case 65: YY_RULE_SETUP -#line 406 "lexer.l" +#line 411 "lexer.l" ECHO; YY_BREAK -#line 1441 "lexer.c" +#line 1453 "lexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(stringstate): case YY_STATE_EOF(commentstate): @@ -1736,7 +1748,7 @@ static yy_state_type yy_get_previous_state() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 404 ) + if ( yy_current_state >= 411 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1771,11 +1783,11 @@ yy_state_type yy_current_state; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 404 ) + if ( yy_current_state >= 411 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 403); + yy_is_jam = (yy_current_state == 410); return yy_is_jam ? 0 : yy_current_state; } @@ -2330,4 +2342,4 @@ int main() return 0; } #endif -#line 406 "lexer.l" +#line 411 "lexer.l" diff --git a/src/lexer.l b/src/lexer.l @@ -150,6 +150,11 @@ externalhandler { return (EXTERNALHANDLER); } +byclientip { + lmsg ("byclientip"); + return (BYCLIENTIP); +} + useraccount { lmsg ("useraccount"); BEGIN (stringstate); diff --git a/src/lockreporter.c b/src/lockreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/logactivityany.c b/src/logactivityany.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/logactivitycontinuation.c b/src/logactivitycontinuation.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/logactivityend.c b/src/logactivityend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/logactivitystart.c b/src/logactivitystart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/main.c b/src/main.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/makesocket.c b/src/makesocket.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/markactivity.c b/src/markactivity.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/msg.c b/src/msg.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/msgdumpbuf.c b/src/msgdumpbuf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/netbuffer.c b/src/netbuffer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/netbufread.c b/src/netbufread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/netcopy.c b/src/netcopy.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -65,11 +65,18 @@ unsigned net_copy (int cl, int sr, unsigned max, unsigned char *buf) { decr_client_count(); log_activity_end(); if (nread < 0) { + /* An exception on the network socket. If this is the server + * that's sending, then we issue an error message. + * If this is the client, then we'll just issue a verbose + * message; clients are notorious for just dropping dead. */ if (dir == dir_server_to_client) - mark_activity (0, 0, st_unavailable); - error ("Service %s: read error when getting data from %s", - activeservice->name, - dir == dir_client_to_server ? "client" : "server"); + error ("Service %s: Read error from server", + activeservice->name); + else { + msg ("Service %s: Read error from client", + activeservice->name); + exit (0); + } } else { msg ("Service %s: %s signals end of data", activeservice->name, diff --git a/src/netread.c b/src/netread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -60,9 +60,18 @@ unsigned net_read (int sock, unsigned max, unsigned char *buf, int is_client) { decr_client_count(); log_activity_end(); if (nread < 0) { - mark_activity (0, 0, is_client ? st_available : st_unavailable); - error ("Service %s: read error when getting data from %s: %s", - activeservice->name, desc, strerror(errno)); + /* An exception on the network socket. If this is the server + * that's sending, then we issue an error message. + * If this is the client, then we'll just issue a verbose + * message; clients are notorious for just dropping dead. */ + if (dir == dir_server_to_client) + error ("Service %s: Read error from server", + activeservice->name); + else { + msg ("Service %s: Read error from client", + activeservice->name); + exit (0); + } } else { msg ("Service %s: %s signals end of data", activeservice->name, desc); diff --git a/src/netwrite.c b/src/netwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/parser.c b/src/parser.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -55,6 +55,7 @@ # define EXTERNALHANDLER 301 # define ONEND 302 # define USERACCOUNT 303 +# define BYCLIENTIP 304 #line 3 "parser.y" @@ -178,12 +179,12 @@ static void setuseraccount (char *username) { -#define YYFINAL 197 +#define YYFINAL 198 #define YYFLAG -32768 -#define YYNTBASE 53 +#define YYNTBASE 54 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ -#define YYTRANSLATE(x) ((unsigned)(x) <= 303 ? yytranslate[x] : 132) +#define YYTRANSLATE(x) ((unsigned)(x) <= 304 ? yytranslate[x] : 133) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = @@ -193,14 +194,14 @@ static const char yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 52, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 53, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 50, 2, 51, 2, 2, 2, 2, + 2, 2, 2, 51, 2, 52, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -218,7 +219,7 @@ static const char yytranslate[] = 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49 + 46, 47, 48, 49, 50 }; #if YYDEBUG @@ -228,51 +229,51 @@ static const short yyprhs[] = 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 61, 65, 68, 71, 74, 79, 81, 83, 88, 90, 92, 93, 96, 99, - 101, 104, 106, 108, 110, 112, 114, 116, 118, 122, - 125, 129, 133, 137, 141, 145, 149, 152, 154, 156, - 160, 164, 168, 172, 175, 181, 184, 187, 189, 192, + 101, 104, 106, 108, 110, 112, 114, 116, 118, 120, + 124, 127, 131, 135, 139, 143, 147, 151, 154, 156, + 158, 162, 166, 170, 174, 177, 183, 186, 189, 191, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, - 214, 216, 218, 220, 222, 224, 226, 228, 233, 237, - 241, 243, 247, 251, 255, 259, 263, 266, 269, 273, - 276, 280, 284, 288, 292, 296, 300, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320 + 214, 216, 218, 220, 222, 224, 226, 228, 230, 235, + 239, 243, 245, 249, 253, 257, 261, 265, 268, 271, + 275, 278, 282, 286, 290, 294, 298, 302, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322 }; static const short yyrhs[] = { - 54, 53, 0, 54, 0, 55, 56, 50, 57, 51, - 0, 118, 3, 0, 126, 4, 0, 57, 58, 0, - 58, 0, 120, 59, 0, 60, 0, 61, 0, 65, - 0, 67, 0, 76, 0, 77, 0, 78, 0, 79, - 0, 80, 0, 81, 0, 84, 0, 86, 0, 85, - 0, 87, 0, 74, 0, 89, 0, 5, 63, 64, - 0, 31, 62, 64, 0, 128, 19, 0, 116, 6, - 0, 121, 52, 0, 8, 122, 66, 64, 0, 10, - 0, 11, 0, 12, 72, 68, 64, 0, 69, 0, - 71, 0, 0, 29, 70, 0, 116, 6, 0, 103, - 0, 123, 73, 0, 13, 0, 21, 0, 22, 0, - 23, 0, 27, 0, 24, 0, 47, 0, 49, 75, - 64, 0, 131, 19, 0, 14, 63, 64, 0, 20, - 63, 64, 0, 15, 63, 64, 0, 25, 63, 64, - 0, 26, 63, 64, 0, 33, 82, 64, 0, 129, - 83, 0, 34, 0, 35, 0, 43, 88, 64, 0, - 44, 88, 64, 0, 45, 104, 64, 0, 46, 104, - 64, 0, 130, 19, 0, 7, 90, 50, 91, 51, - 0, 127, 4, 0, 91, 92, 0, 92, 0, 119, - 93, 0, 94, 0, 60, 0, 65, 0, 98, 0, - 100, 0, 99, 0, 101, 0, 102, 0, 95, 0, - 96, 0, 80, 0, 105, 0, 107, 0, 108, 0, - 109, 0, 110, 0, 111, 0, 112, 0, 9, 117, - 97, 64, 0, 16, 63, 64, 0, 30, 63, 64, - 0, 19, 0, 17, 103, 64, 0, 18, 103, 64, - 0, 48, 103, 64, 0, 28, 104, 64, 0, 32, - 104, 64, 0, 124, 19, 0, 125, 19, 0, 36, - 106, 64, 0, 115, 19, 0, 37, 113, 64, 0, - 38, 113, 64, 0, 39, 113, 64, 0, 40, 113, - 64, 0, 41, 113, 64, 0, 42, 113, 64, 0, - 114, 19, 0, 0, 0, 0, 0, 0, 0, 0, + 55, 54, 0, 55, 0, 56, 57, 51, 58, 52, + 0, 119, 3, 0, 127, 4, 0, 58, 59, 0, + 59, 0, 121, 60, 0, 61, 0, 62, 0, 66, + 0, 68, 0, 77, 0, 78, 0, 79, 0, 80, + 0, 81, 0, 82, 0, 85, 0, 87, 0, 86, + 0, 88, 0, 75, 0, 90, 0, 5, 64, 65, + 0, 31, 63, 65, 0, 129, 19, 0, 117, 6, + 0, 122, 53, 0, 8, 123, 67, 65, 0, 10, + 0, 11, 0, 12, 73, 69, 65, 0, 70, 0, + 72, 0, 0, 29, 71, 0, 117, 6, 0, 104, + 0, 124, 74, 0, 13, 0, 21, 0, 22, 0, + 23, 0, 27, 0, 24, 0, 47, 0, 50, 0, + 49, 76, 65, 0, 132, 19, 0, 14, 64, 65, + 0, 20, 64, 65, 0, 15, 64, 65, 0, 25, + 64, 65, 0, 26, 64, 65, 0, 33, 83, 65, + 0, 130, 84, 0, 34, 0, 35, 0, 43, 89, + 65, 0, 44, 89, 65, 0, 45, 105, 65, 0, + 46, 105, 65, 0, 131, 19, 0, 7, 91, 51, + 92, 52, 0, 128, 4, 0, 92, 93, 0, 93, + 0, 120, 94, 0, 95, 0, 61, 0, 66, 0, + 99, 0, 101, 0, 100, 0, 102, 0, 103, 0, + 96, 0, 97, 0, 81, 0, 106, 0, 108, 0, + 109, 0, 110, 0, 111, 0, 112, 0, 113, 0, + 9, 118, 98, 65, 0, 16, 64, 65, 0, 30, + 64, 65, 0, 19, 0, 17, 104, 65, 0, 18, + 104, 65, 0, 48, 104, 65, 0, 28, 105, 65, + 0, 32, 105, 65, 0, 125, 19, 0, 126, 19, + 0, 36, 107, 65, 0, 116, 19, 0, 37, 114, + 65, 0, 38, 114, 65, 0, 39, 114, 65, 0, + 40, 114, 65, 0, 41, 114, 65, 0, 42, 114, + 65, 0, 115, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0 + 0, 0, 0 }; #endif @@ -285,15 +286,15 @@ static const short yyrline[] = 197, 203, 209, 219, 225, 231, 237, 243, 249, 255, 261, 267, 273, 279, 286, 439, 451, 463, 472, 479, 484, 497, 501, 507, 516, 518, 520, 524, 541, 548, - 558, 567, 571, 575, 579, 583, 587, 591, 597, 609, - 618, 630, 642, 654, 666, 678, 690, 695, 699, 705, - 717, 729, 741, 753, 762, 772, 780, 788, 794, 801, - 806, 811, 816, 821, 826, 831, 836, 841, 846, 851, - 856, 861, 866, 871, 876, 881, 886, 893, 906, 918, - 930, 936, 948, 960, 972, 984, 996, 1005, 1014, 1026, - 1035, 1047, 1059, 1071, 1083, 1095, 1107, 1116, 1121, 1126, - 1131, 1136, 1141, 1146, 1151, 1156, 1161, 1166, 1171, 1176, - 1181, 1186, 1191, 1196, 1201 + 558, 567, 571, 575, 579, 583, 587, 591, 595, 601, + 613, 622, 634, 646, 658, 670, 682, 694, 699, 703, + 709, 721, 733, 745, 757, 766, 776, 784, 792, 798, + 805, 810, 815, 820, 825, 830, 835, 840, 845, 850, + 855, 860, 865, 870, 875, 880, 885, 890, 897, 910, + 922, 934, 940, 952, 964, 976, 988, 1000, 1009, 1018, + 1030, 1039, 1051, 1063, 1075, 1087, 1099, 1111, 1120, 1125, + 1130, 1135, 1140, 1145, 1150, 1155, 1160, 1165, 1170, 1175, + 1180, 1185, 1190, 1195, 1200, 1205 }; #endif @@ -312,12 +313,12 @@ static const char *const yytname[] = "HTTP", "STICKYCOOKIE", "ADDCLIENTHEADER", "SETCLIENTHEADER", "APPENDCLIENTHEADER", "ADDSERVERHEADER", "SETSERVERHEADER", "APPENDSERVERHEADER", "ALLOWFROM", "DENYFROM", "ALLOWFILE", "DENYFILE", - "EXTERNALHANDLER", "ONEND", "USERACCOUNT", "'{'", "'}'", "';'", "input", - "element", "service", "servicename", "servicestatements", - "servicestatement", "servicebody", "portstatement", "bindstatement", - "ipaddress", "number", "semicol", "verbositystatement", "onoff", - "dispatchmodestatement", "dispatchtail", "dispatchover", "overnumber", - "dispatchext", "dispatchmethod", "dispatchmethodspec", + "EXTERNALHANDLER", "ONEND", "USERACCOUNT", "BYCLIENTIP", "'{'", "'}'", + "';'", "input", "element", "service", "servicename", + "servicestatements", "servicestatement", "servicebody", "portstatement", + "bindstatement", "ipaddress", "number", "semicol", "verbositystatement", + "onoff", "dispatchmodestatement", "dispatchtail", "dispatchover", + "overnumber", "dispatchext", "dispatchmethod", "dispatchmethodspec", "useraccountstatement", "useraccount", "revivingintervalstatement", "backlogstatement", "shmkeystatement", "connectiontimeoutstatement", "maxconnectionsstatement", "typestatement", "typespec", "typespecifier", @@ -344,19 +345,19 @@ static const char *const yytname[] = /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { - 0, 53, 53, 54, 55, 56, 57, 57, 58, 59, - 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 60, 61, 62, 63, 64, - 65, 66, 66, 67, 68, 68, 68, 69, 70, 71, - 72, 73, 73, 73, 73, 73, 73, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 91, 92, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 94, 95, 96, + 0, 54, 54, 55, 56, 57, 58, 58, 59, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 61, 62, 63, 64, 65, + 66, 67, 67, 68, 69, 69, 69, 70, 71, 72, + 73, 74, 74, 74, 74, 74, 74, 74, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 92, 93, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131 + 127, 128, 129, 130, 131, 132 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -366,15 +367,15 @@ static const short yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 2, 2, 2, 4, 1, 1, 4, 1, 1, 0, 2, 2, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 3, 2, - 3, 3, 3, 3, 3, 3, 2, 1, 1, 3, - 3, 3, 3, 2, 5, 2, 2, 1, 2, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 2, 3, 3, 3, 3, 3, 3, 2, 1, 1, + 3, 3, 3, 3, 2, 5, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 4, 3, 3, - 1, 3, 3, 3, 3, 3, 2, 2, 3, 2, - 3, 3, 3, 3, 3, 3, 2, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 4, 3, + 3, 1, 3, 3, 3, 3, 3, 2, 2, 3, + 2, 3, 3, 3, 3, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE @@ -382,120 +383,120 @@ static const short yyr2[] = error. */ static const short yydefact[] = { - 111, 2, 119, 0, 1, 0, 0, 4, 113, 5, - 113, 7, 0, 3, 6, 109, 120, 115, 116, 109, - 109, 109, 109, 109, 121, 122, 123, 123, 118, 118, - 124, 8, 9, 10, 11, 12, 23, 13, 14, 15, - 16, 17, 18, 19, 21, 20, 22, 24, 114, 0, - 0, 0, 0, 36, 0, 114, 114, 114, 114, 114, - 114, 0, 114, 0, 114, 0, 114, 114, 0, 114, - 114, 0, 25, 0, 28, 112, 65, 31, 32, 114, - 109, 114, 34, 35, 39, 0, 41, 42, 43, 44, - 46, 45, 47, 40, 50, 52, 51, 53, 54, 26, - 27, 55, 57, 58, 56, 59, 63, 60, 61, 97, - 62, 48, 49, 29, 112, 67, 0, 30, 37, 0, - 33, 96, 64, 66, 110, 109, 117, 117, 118, 109, - 118, 108, 107, 107, 107, 107, 107, 107, 117, 70, - 71, 79, 68, 69, 77, 78, 72, 74, 73, 75, - 76, 80, 81, 82, 83, 84, 85, 86, 38, 0, - 114, 114, 114, 114, 114, 114, 114, 0, 114, 0, - 114, 114, 114, 114, 114, 114, 90, 114, 88, 91, - 92, 94, 89, 95, 98, 99, 100, 106, 101, 102, - 103, 104, 105, 93, 87, 0, 0, 0 + 112, 2, 120, 0, 1, 0, 0, 4, 114, 5, + 114, 7, 0, 3, 6, 110, 121, 116, 117, 110, + 110, 110, 110, 110, 122, 123, 124, 124, 119, 119, + 125, 8, 9, 10, 11, 12, 23, 13, 14, 15, + 16, 17, 18, 19, 21, 20, 22, 24, 115, 0, + 0, 0, 0, 36, 0, 115, 115, 115, 115, 115, + 115, 0, 115, 0, 115, 0, 115, 115, 0, 115, + 115, 0, 25, 0, 28, 113, 66, 31, 32, 115, + 110, 115, 34, 35, 39, 0, 41, 42, 43, 44, + 46, 45, 47, 48, 40, 51, 53, 52, 54, 55, + 26, 27, 56, 58, 59, 57, 60, 64, 61, 62, + 98, 63, 49, 50, 29, 113, 68, 0, 30, 37, + 0, 33, 97, 65, 67, 111, 110, 118, 118, 119, + 110, 119, 109, 108, 108, 108, 108, 108, 108, 118, + 71, 72, 80, 69, 70, 78, 79, 73, 75, 74, + 76, 77, 81, 82, 83, 84, 85, 86, 87, 38, + 0, 115, 115, 115, 115, 115, 115, 115, 0, 115, + 0, 115, 115, 115, 115, 115, 115, 91, 115, 89, + 92, 93, 95, 90, 96, 99, 100, 101, 107, 102, + 103, 104, 105, 106, 94, 88, 0, 0, 0 }; static const short yydefgoto[] = { 4, 1, 2, 5, 10, 11, 31, 32, 33, 60, - 48, 72, 34, 79, 35, 81, 82, 118, 83, 53, - 93, 36, 70, 37, 38, 39, 40, 41, 42, 62, - 104, 43, 44, 45, 46, 64, 47, 50, 114, 115, - 142, 143, 144, 145, 177, 146, 147, 148, 149, 150, - 84, 67, 151, 166, 152, 153, 154, 155, 156, 157, - 168, 169, 167, 49, 159, 3, 116, 12, 73, 52, + 48, 72, 34, 79, 35, 81, 82, 119, 83, 53, + 94, 36, 70, 37, 38, 39, 40, 41, 42, 62, + 105, 43, 44, 45, 46, 64, 47, 50, 115, 116, + 143, 144, 145, 146, 178, 147, 148, 149, 150, 151, + 84, 67, 152, 167, 153, 154, 155, 156, 157, 158, + 169, 170, 168, 49, 160, 3, 117, 12, 73, 52, 54, 85, 68, 6, 51, 61, 63, 65, 71 }; static const short yypact[] = { - -32768, 5,-32768, 7,-32768, -19, 29,-32768,-32768,-32768, - -12,-32768, 20,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768, 5,-32768, 7,-32768, -20, 29,-32768,-32768,-32768, + -14,-32768, 20,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 32, - -8, 39, 12, -13, 34,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 33, + -9, 39, 12, -13, 34,-32768,-32768,-32768,-32768,-32768, -32768, 25,-32768, 2,-32768, 30,-32768,-32768, 31,-32768, - -32768, 33,-32768, -4,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768, 35,-32768,-32768,-32768,-32768, + -32768, 35,-32768, -5,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768,-32768,-32768, 40,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768, 8,-32768, 116,-32768,-32768, 54, + -32768,-32768,-32768,-32768,-32768, 0,-32768, 117,-32768,-32768, + 54,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 43, - -32768,-32768,-32768,-32768,-32768,-32768,-32768, 48,-32768, 49, + 43,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 48,-32768, + 49,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768, 75, 76,-32768 + -32768,-32768,-32768,-32768,-32768,-32768, 75, 76,-32768 }; static const short yypgoto[] = { - 77,-32768,-32768,-32768,-32768, 68,-32768, -37,-32768,-32768, - -2, -55, -36,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768,-32768, -34,-32768,-32768, + 77,-32768,-32768,-32768,-32768, 68,-32768, -38,-32768,-32768, + -2, -55, -37,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768,-32768,-32768,-32768,-32768, -35,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 56,-32768,-32768,-32768, -30, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -97, -16,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -63,-32768,-32768, 6,-32768,-32768,-32768,-32768,-32768,-32768, + -98, -16,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -64,-32768,-32768, 6,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768 }; -#define YYLAST 164 +#define YYLAST 165 static const short yytable[] = { - 94, 95, 96, 97, 98, 99, -117, 101, -111, 105, - 7, 107, 108, 69, 110, 111, 80, 55, 56, 57, - 58, 59, 77, 78, 117, 15, 120, 16, 17, 161, - 162, 8, 18, 9, 19, 20, 102, 103, 74, 13, - 21, 175, 75, 76, 100, 22, 23, 86, 113, 106, - 109, 24, 112, 25, 121, 87, 88, 89, 90, 122, - 158, 91, 176, 26, 27, 28, 29, 185, 187, 30, - 170, 171, 172, 173, 174, 196, 197, 195, 14, 139, - 140, 92, 141, 66, 123, 0, 119, 0, 0, 0, + 95, 96, 97, 98, 99, 100, -118, 102, -112, 106, + 7, 108, 109, 69, 111, 112, 80, 55, 56, 57, + 58, 59, 77, 78, 118, 15, 121, 16, 17, 162, + 163, 8, 18, 9, 19, 20, 103, 104, 13, 74, + 21, 176, 75, 76, 101, 22, 23, 86, 114, 107, + 110, 24, 123, 25, 113, 87, 88, 89, 90, 122, + 159, 91, 177, 26, 27, 28, 29, 186, 188, 30, + 171, 172, 173, 174, 175, 197, 198, 196, 14, 140, + 141, 92, 142, 66, 93, 124, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 178, 179, 180, 181, 182, - 183, 184, 163, 186, 165, 188, 189, 190, 191, 192, - 193, 15, 194, 160, 17, 124, 0, 164, 0, 0, - 0, 0, 125, 126, 127, 0, 0, 0, 0, 0, - 0, 0, 23, 0, 128, 0, 129, 0, 130, 0, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 0, - 0, 0, 0, 0, 138 + 0, 0, 0, 0, 0, 0, 179, 180, 181, 182, + 183, 184, 185, 164, 187, 166, 189, 190, 191, 192, + 193, 194, 15, 195, 161, 17, 125, 0, 165, 0, + 0, 0, 0, 126, 127, 128, 0, 0, 0, 0, + 0, 0, 0, 23, 0, 129, 0, 130, 0, 131, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 0, 0, 0, 0, 0, 139 }; static const short yycheck[] = { 55, 56, 57, 58, 59, 60, 19, 62, 3, 64, 3, 66, 67, 29, 69, 70, 29, 19, 20, 21, - 22, 23, 10, 11, 79, 5, 81, 7, 8, 126, - 127, 50, 12, 4, 14, 15, 34, 35, 6, 51, - 20, 138, 50, 4, 19, 25, 26, 13, 52, 19, - 19, 31, 19, 33, 19, 21, 22, 23, 24, 51, + 22, 23, 10, 11, 79, 5, 81, 7, 8, 127, + 128, 51, 12, 4, 14, 15, 34, 35, 52, 6, + 20, 139, 51, 4, 19, 25, 26, 13, 53, 19, + 19, 31, 52, 33, 19, 21, 22, 23, 24, 19, 6, 27, 19, 43, 44, 45, 46, 19, 19, 49, - 133, 134, 135, 136, 137, 0, 0, 0, 10, 116, - 116, 47, 116, 27, 114, -1, 80, -1, -1, -1, + 134, 135, 136, 137, 138, 0, 0, 0, 10, 117, + 117, 47, 117, 27, 50, 115, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 160, 161, 162, 163, 164, - 165, 166, 128, 168, 130, 170, 171, 172, 173, 174, - 175, 5, 177, 125, 8, 9, -1, 129, -1, -1, - -1, -1, 16, 17, 18, -1, -1, -1, -1, -1, - -1, -1, 26, -1, 28, -1, 30, -1, 32, -1, - -1, -1, 36, 37, 38, 39, 40, 41, 42, -1, - -1, -1, -1, -1, 48 + -1, -1, -1, -1, -1, -1, 161, 162, 163, 164, + 165, 166, 167, 129, 169, 131, 171, 172, 173, 174, + 175, 176, 5, 178, 126, 8, 9, -1, 130, -1, + -1, -1, -1, 16, 17, 18, -1, -1, -1, -1, + -1, -1, -1, 26, -1, 28, -1, 30, -1, 32, + -1, -1, -1, 36, 37, 38, 39, 40, 41, 42, + -1, -1, -1, -1, -1, 48 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/sw/share/bison/bison.simple" @@ -1659,7 +1660,13 @@ case 47: ; break;} case 48: -#line 600 "parser.y" +#line 596 "parser.y" +{ + lastnr = ds_byclientip; + ; + break;} +case 49: +#line 604 "parser.y" { pimsg ("user account statement:", laststr); yyval.n = 1; @@ -1668,16 +1675,16 @@ case 48: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 49: -#line 611 "parser.y" +case 50: +#line 615 "parser.y" { setlaststr (laststring); free (laststring); laststring = 0; ; break;} -case 50: -#line 621 "parser.y" +case 51: +#line 625 "parser.y" { pimsg ("reviving interval statement:", lastnr); yyval.n = 1; @@ -1686,8 +1693,8 @@ case 50: yyval.set[0].v.ival = lastnr; ; break;} -case 51: -#line 633 "parser.y" +case 52: +#line 637 "parser.y" { pimsg ("backlog statement:", lastnr); yyval.n = 1; @@ -1696,8 +1703,8 @@ case 51: yyval.set[0].v.ival = lastnr; ; break;} -case 52: -#line 645 "parser.y" +case 53: +#line 649 "parser.y" { pimsg ("shmkey statement:", lastnr); yyval.n = 1; @@ -1706,8 +1713,8 @@ case 52: yyval.set[0].v.ival = lastnr; ; break;} -case 53: -#line 657 "parser.y" +case 54: +#line 661 "parser.y" { pimsg ("connection timeout statement:", lastnr); yyval.n = 1; @@ -1716,8 +1723,8 @@ case 53: yyval.set[0].v.ival = lastnr; ; break;} -case 54: -#line 669 "parser.y" +case 55: +#line 673 "parser.y" { pimsg ("max clients statement (service):", lastnr); yyval.n = 1; @@ -1726,8 +1733,8 @@ case 54: yyval.set[0].v.ival = lastnr; ; break;} -case 55: -#line 681 "parser.y" +case 56: +#line 685 "parser.y" { pimsg ("service type:", lastnr); yyval.n = 1; @@ -1736,20 +1743,20 @@ case 55: yyval.set[0].v.ival = lastnr; ; break;} -case 57: -#line 696 "parser.y" +case 58: +#line 700 "parser.y" { lastnr = type_any; ; break;} -case 58: -#line 700 "parser.y" +case 59: +#line 704 "parser.y" { lastnr = type_http; ; break;} -case 59: -#line 708 "parser.y" +case 60: +#line 712 "parser.y" { psmsg ("allow from: ", laststr); yyval.n = 1; @@ -1758,8 +1765,8 @@ case 59: yyval.set[0].v.sval = xstrdup(laststr); ; break;} -case 60: -#line 720 "parser.y" +case 61: +#line 724 "parser.y" { psmsg ("allow from: ", laststr); yyval.n = 1; @@ -1768,8 +1775,8 @@ case 60: yyval.set[0].v.sval = xstrdup(laststr); ; break;} -case 61: -#line 732 "parser.y" +case 62: +#line 736 "parser.y" { psmsg ("allow file: ", laststr); yyval.n = 1; @@ -1778,8 +1785,8 @@ case 61: yyval.set[0].v.sval = xstrdup(laststr); ; break;} -case 62: -#line 744 "parser.y" +case 63: +#line 748 "parser.y" { psmsg ("allow file: ", laststr); yyval.n = 1; @@ -1788,29 +1795,29 @@ case 62: yyval.set[0].v.sval = xstrdup(laststr); ; break;} -case 63: -#line 755 "parser.y" +case 64: +#line 759 "parser.y" { setlaststr (laststring); free (laststring); laststring = 0; ; break;} -case 64: -#line 767 "parser.y" +case 65: +#line 771 "parser.y" { yyval = yyvsp[-1]; ; break;} -case 65: -#line 774 "parser.y" +case 66: +#line 778 "parser.y" { psmsg ("backend name:", yytext); cur_backend.name = xstrdup (yytext); ; break;} -case 66: -#line 782 "parser.y" +case 67: +#line 786 "parser.y" { yyvsp[-1].n++; yyvsp[-1].set = xrealloc (yyvsp[-1].set, yyvsp[-1].n * sizeof(Confset)); @@ -1818,146 +1825,146 @@ case 66: yyval = yyvsp[-1]; ; break;} -case 67: -#line 789 "parser.y" +case 68: +#line 793 "parser.y" { yyval = yyvsp[0]; ; break;} -case 68: -#line 796 "parser.y" +case 69: +#line 800 "parser.y" { yyval = yyvsp[0]; ; break;} -case 69: -#line 802 "parser.y" +case 70: +#line 806 "parser.y" { psmsg ("backend server:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 70: -#line 807 "parser.y" +case 71: +#line 811 "parser.y" { pimsg ("backend port:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} -case 71: -#line 812 "parser.y" +case 72: +#line 816 "parser.y" { pimsg ("backend verbosity:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} -case 72: -#line 817 "parser.y" +case 73: +#line 821 "parser.y" { psmsg ("backend onstart:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 73: -#line 822 "parser.y" +case 74: +#line 826 "parser.y" { psmsg ("backend onend:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 74: -#line 827 "parser.y" +case 75: +#line 831 "parser.y" { psmsg ("backend onfail:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 75: -#line 832 "parser.y" +case 76: +#line 836 "parser.y" { psmsg ("backend trafficlog:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 76: -#line 837 "parser.y" +case 77: +#line 841 "parser.y" { psmsg ("backend trafficlog:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 77: -#line 842 "parser.y" +case 78: +#line 846 "parser.y" { pimsg ("backend weight:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} -case 78: -#line 847 "parser.y" +case 79: +#line 851 "parser.y" { pimsg ("backend decay:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} -case 79: -#line 852 "parser.y" +case 80: +#line 856 "parser.y" { pimsg ("backend maxconnections:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} -case 80: -#line 857 "parser.y" +case 81: +#line 861 "parser.y" { psmsg ("backend sticky cookie:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 81: -#line 862 "parser.y" +case 82: +#line 866 "parser.y" { psmsg ("addclientheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 82: -#line 867 "parser.y" +case 83: +#line 871 "parser.y" { psmsg ("setclientheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 83: -#line 872 "parser.y" +case 84: +#line 876 "parser.y" { psmsg ("appendclientheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 84: -#line 877 "parser.y" +case 85: +#line 881 "parser.y" { psmsg ("addserverheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 85: -#line 882 "parser.y" +case 86: +#line 886 "parser.y" { psmsg ("setserverheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 86: -#line 887 "parser.y" +case 87: +#line 891 "parser.y" { psmsg ("appendserverheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} -case 87: -#line 897 "parser.y" +case 88: +#line 901 "parser.y" { psmsg ("server statement:", laststr); yyval.n = 1; @@ -1966,8 +1973,8 @@ case 87: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 88: -#line 909 "parser.y" +case 89: +#line 913 "parser.y" { pimsg ("weight statement", lastnr); yyval.n = 1; @@ -1976,8 +1983,8 @@ case 88: yyval.set[0].v.ival = lastnr; ; break;} -case 89: -#line 921 "parser.y" +case 90: +#line 925 "parser.y" { pimsg ("decay statement", lastnr); yyval.n = 1; @@ -1986,14 +1993,14 @@ case 89: yyval.set[0].v.ival = lastnr; ; break;} -case 90: -#line 931 "parser.y" +case 91: +#line 935 "parser.y" { setlaststr (laststring); ; break;} -case 91: -#line 939 "parser.y" +case 92: +#line 943 "parser.y" { psmsg ("onstart statement:", laststr); yyval.n = 1; @@ -2002,8 +2009,8 @@ case 91: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 92: -#line 951 "parser.y" +case 93: +#line 955 "parser.y" { psmsg ("onfail statement:", laststr); yyval.n = 1; @@ -2012,8 +2019,8 @@ case 92: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 93: -#line 963 "parser.y" +case 94: +#line 967 "parser.y" { psmsg ("onend statement:", laststr); yyval.n = 1; @@ -2022,8 +2029,8 @@ case 93: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 94: -#line 975 "parser.y" +case 95: +#line 979 "parser.y" { psmsg ("trafficlog statement:", laststr); yyval.n = 1; @@ -2032,8 +2039,8 @@ case 94: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 95: -#line 987 "parser.y" +case 96: +#line 991 "parser.y" { psmsg ("throughputlog statement:", laststr); yyval.n = 1; @@ -2042,24 +2049,24 @@ case 95: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 96: -#line 998 "parser.y" +case 97: +#line 1002 "parser.y" { setlaststr (laststring); free (laststring); laststring = 0; ; break;} -case 97: -#line 1007 "parser.y" +case 98: +#line 1011 "parser.y" { setlaststr (laststring); free (laststring); laststring = 0; ; break;} -case 98: -#line 1017 "parser.y" +case 99: +#line 1021 "parser.y" { psmsg ("insertcookie statement:", laststr); yyval.n = 1; @@ -2068,16 +2075,16 @@ case 98: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 99: -#line 1028 "parser.y" +case 100: +#line 1032 "parser.y" { setlaststr (laststring); free (laststring); laststring = 0; ; break;} -case 100: -#line 1038 "parser.y" +case 101: +#line 1042 "parser.y" { psmsg ("addclientheader statement:", laststr); yyval.n = 1; @@ -2086,8 +2093,8 @@ case 100: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 101: -#line 1050 "parser.y" +case 102: +#line 1054 "parser.y" { psmsg ("setclientheader statement:", laststr); yyval.n = 1; @@ -2096,8 +2103,8 @@ case 101: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 102: -#line 1062 "parser.y" +case 103: +#line 1066 "parser.y" { psmsg ("appendclientheader statement:", laststr); yyval.n = 1; @@ -2106,8 +2113,8 @@ case 102: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 103: -#line 1074 "parser.y" +case 104: +#line 1078 "parser.y" { psmsg ("addserverheader statement:", laststr); yyval.n = 1; @@ -2116,8 +2123,8 @@ case 103: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 104: -#line 1086 "parser.y" +case 105: +#line 1090 "parser.y" { psmsg ("setserverheader statement:", laststr); yyval.n = 1; @@ -2126,8 +2133,8 @@ case 104: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 105: -#line 1098 "parser.y" +case 106: +#line 1102 "parser.y" { psmsg ("appendserverheader statement:", laststr); yyval.n = 1; @@ -2136,118 +2143,118 @@ case 105: yyval.set[0].v.sval = xstrdup (laststr); ; break;} -case 106: -#line 1109 "parser.y" +case 107: +#line 1113 "parser.y" { setlaststr (laststring); free (laststring); laststring = 0; ; break;} -case 107: -#line 1116 "parser.y" +case 108: +#line 1120 "parser.y" { yyerrmsg = "HTTP header specifier expected"; ; break;} -case 108: -#line 1121 "parser.y" +case 109: +#line 1125 "parser.y" { yyerrmsg = "cookie specifier expected"; ; break;} -case 109: -#line 1126 "parser.y" +case 110: +#line 1130 "parser.y" { yyerrmsg = "number expected"; ; break;} -case 110: -#line 1131 "parser.y" +case 111: +#line 1135 "parser.y" { yyerrmsg = "hostname or IP address expected"; ; break;} -case 111: -#line 1136 "parser.y" +case 112: +#line 1140 "parser.y" { yyerrmsg = "'service' expected"; ; break;} -case 112: -#line 1141 "parser.y" +case 113: +#line 1145 "parser.y" { yyerrmsg = "backend definition statement expected"; ; break;} -case 113: -#line 1146 "parser.y" +case 114: +#line 1150 "parser.y" { yyerrmsg = "service body statement expected"; ; break;} -case 114: -#line 1151 "parser.y" +case 115: +#line 1155 "parser.y" { yyerrmsg = "semicolon (;) expected"; ; break;} -case 115: -#line 1156 "parser.y" +case 116: +#line 1160 "parser.y" { yyerrmsg = "'on' or 'off' expetcted"; ; break;} -case 116: -#line 1161 "parser.y" +case 117: +#line 1165 "parser.y" { yyerrmsg = "dispatch method expected"; ; break;} -case 117: -#line 1166 "parser.y" +case 118: +#line 1170 "parser.y" { yyerrmsg = "command line expected"; ; break;} -case 118: -#line 1171 "parser.y" +case 119: +#line 1175 "parser.y" { yyerrmsg = "file name expected"; ; break;} -case 119: -#line 1176 "parser.y" +case 120: +#line 1180 "parser.y" { yyerrmsg = "service name (identifier) expected"; ; break;} -case 120: -#line 1181 "parser.y" +case 121: +#line 1185 "parser.y" { yyerrmsg = "backend name (identifier) expected"; ; break;} -case 121: -#line 1186 "parser.y" +case 122: +#line 1190 "parser.y" { yyerrmsg = "IP address or 'any' expected"; ; break;} -case 122: -#line 1191 "parser.y" +case 123: +#line 1195 "parser.y" { yyerrmsg = "Service type expected ('any', 'stickyhttp', ...)"; ; break;} -case 123: -#line 1196 "parser.y" +case 124: +#line 1200 "parser.y" { yyerrmsg = "IP filter(s) expected"; ; break;} -case 124: -#line 1201 "parser.y" +case 125: +#line 1205 "parser.y" { yyerrmsg = "username expected"; ; @@ -2485,4 +2492,4 @@ yyreturn: #endif return yyresult; } -#line 1205 "parser.y" +#line 1209 "parser.y" diff --git a/src/parser.h b/src/parser.h @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -57,6 +57,7 @@ # define EXTERNALHANDLER 301 # define ONEND 302 # define USERACCOUNT 303 +# define BYCLIENTIP 304 extern YYSTYPE yylval; diff --git a/src/parser.y b/src/parser.y @@ -122,7 +122,7 @@ static void setuseraccount (char *username) { STICKYCOOKIE ADDCLIENTHEADER SETCLIENTHEADER APPENDCLIENTHEADER ADDSERVERHEADER SETSERVERHEADER APPENDSERVERHEADER ALLOWFROM DENYFROM ALLOWFILE DENYFILE EXTERNALHANDLER ONEND - USERACCOUNT + USERACCOUNT BYCLIENTIP %% /* Config file grammar rules */ @@ -592,6 +592,10 @@ dispatchmethodspec: EXTERNALHANDLER { lastnr = ds_externalhandler; } +| + BYCLIENTIP { + lastnr = ds_byclientip; + } ; useraccountstatement: diff --git a/src/restart.c b/src/restart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/runservice.c b/src/runservice.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/serve.c b/src/serve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/setprogramtitle.c b/src/setprogramtitle.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/showservices.c b/src/showservices.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/showstatus.c b/src/showstatus.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/stagetostring.c b/src/stagetostring.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/statetostring.c b/src/statetostring.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/stopdaemon.c b/src/stopdaemon.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/strcasestr.c b/src/strcasestr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/strexpandformat.c b/src/strexpandformat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/stringtostate.c b/src/stringtostate.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/strlcat.c b/src/strlcat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/strprintf.c b/src/strprintf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/strvprintf.c b/src/strvprintf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/sysrun.c b/src/sysrun.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/tcpserve.c b/src/tcpserve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/tellservice.c b/src/tellservice.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/thruputlog.c b/src/thruputlog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/trafficlog.c b/src/trafficlog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/uidassume.c b/src/uidassume.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/uidrestore.c b/src/uidrestore.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/unlockreporter.c b/src/unlockreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/usage.c b/src/usage.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/vsyslog.c b/src/vsyslog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/wakeuphandler.c b/src/wakeuphandler.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/warning.c b/src/warning.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/writelog.c b/src/writelog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/xmalloc.c b/src/xmalloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/xrealloc.c b/src/xrealloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/xstrcat.c b/src/xstrcat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/xstrcatch.c b/src/xstrcatch.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, 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/xstrdup.c b/src/xstrdup.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.31, a load balancer and fail over + * This file is part of Crosroads 1.32, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/