Commit Graph

10 Commits

Author SHA1 Message Date
Willy Tarreau 29b366dcdd [CLEANUP] remove ifdef MSG_NOSIGNAL and define it instead
ifdefs are really annoying in the code. Define MSG_NOSIGNAL to zero
when undefined and remove associated ifdefs.

(cherry picked from commit d6d06909da)
2009-10-03 19:12:12 +02:00
Willy Tarreau 177e2b0127 [CLEANUP] remove dependency on obsolete INTBITS macro
The INTBITS macro was found to be already defined on some platforms,
and to equal 32 (while INTBITS was 5 here). Due to pure luck, there
was no declaration conflict, but it's nonetheless a problem to fix.

Looking at the code showed that this macro was only used for left
shifts and nothing else anymore. So the replacement is obvious. The
new macro, BITS_PER_INT is more obviously correct.
2008-07-16 10:30:44 +02:00
Jeremy Hinegardner e7dd2f29b9 [BUILD] fix build with gcc 4.3
For Fedora 9 gcc 4.3 will be shipping as a feature, and right now haproxy does
not compile with gcc 4.3.

It appears that there is a reordering of headers or something along those lines,
This is the patch that gets haproxy to compile with gcc 4.3.  I'm not sure if
this is the correct approach you would want to use, so please correct me.

If this works for you, I'll go ahead and put this patch in the src rpm until a
release of haproxy which compiles with gcc 4.3 is released.
2008-04-21 07:35:00 +02:00
Willy Tarreau 0a45989de3 [MINOR] add transparent proxy support for balabit's Tproxy v4
Balabit's TPROXY version 4 which replaces CTTPROXY provides a similar
API to the previous proxy, but relies on IP_FREEBIND instead of
IP_TRANSPARENT. Let's add it.
2008-01-13 17:37:16 +01:00
Willy Tarreau b1e52e8c44 [MEDIUM] support fully transparent proxy on Linux (USE_LINUX_TPROXY)
Using some Linux kernel patches, it is possible to redirect non-local
traffic to local sockets when IP forwarding is enabled. In order to
enable this option, we introduce the "transparent" option keyword on
the "bind" command line. It will make the socket reachable by remote
sources even if the destination address does not belong to the machine.
2008-01-13 14:49:51 +01:00
Willy Tarreau c8f24f8ec1 [BUILD] fix 2 minor issues on AIX
AIX does not know about MSG_DONTWAIT. Fortunately, nearly all sockets
are already set to O_NONBLOCK, so it's not even required to change the
code.  It was only necessary to add this fcntl to the log socket which
lacked it.  The MSG_DONTWAIT value has been defined to zero when unset
in order to make the code cleaner and more portable.

Also, on AIX, "hz" is defined, which causes a problem with one function
parameter in time.c. It's enough to rename the parameter there. Last,
fix a missing #include <string.h> in proxy.c.
2007-11-30 18:38:35 +01:00
Willy Tarreau 3ff3dc1fb1 [MINOR] add support for variable size arrays in structures
Depending on the version of GCC, variable size arrays are not
declared in the same manner. Let's add a check for the version
and provide a macro.
2007-05-08 14:08:05 +02:00
Willy Tarreau 58b2f83685 [MEDIUM] add support for SO_REUSEPORT on Linux
SO_REUSEPORT does not exist on Linux but the checks are available in
the code. With a little patch, it's possible to implement the feature,
but the value of SO_REUSEPORT will still have to be known from userland.
This patch adds a workaround to this problem by figuring out the value
for the one used by SO_REUSEADDR.
2006-11-13 01:22:38 +01:00
Willy Tarreau e3ba5f0aaa [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00
Willy Tarreau 2dd0d4799e [CLEANUP] renamed include/haproxy to include/common 2006-06-29 17:53:05 +02:00