BUILD: add support for linux kernels >= 2.6.28
Since all kernels starting from 2.6.28 support both splice() and tproxy,
add such a target to simplify the build process.
diff --git a/Makefile b/Makefile
index c70dc94..2aeda2b 100644
--- a/Makefile
+++ b/Makefile
@@ -19,8 +19,8 @@
# USE_SEPOLL : enable speculative epoll(). Automatic.
# USE_STATIC_PCRE : enable static libpcre. Recommended.
# USE_TPROXY : enable transparent proxy. Automatic.
-# USE_LINUX_TPROXY : enable full transparent proxy (needs kernel 2.6.28).
-# USE_LINUX_SPLICE : enable kernel 2.6 splicing (broken on old kernels)
+# USE_LINUX_TPROXY : enable full transparent proxy. Automatic.
+# USE_LINUX_SPLICE : enable kernel 2.6 splicing. Automatic.
# USE_LIBCRYPT : enable crypted passwords using -lcrypt
# USE_CRYPT_H : set it if your system requires including crypt.h
# USE_VSYSCALL : enable vsyscall on Linux x86, bypassing libc
@@ -220,6 +220,18 @@
USE_TPROXY = implicit
USE_LIBCRYPT = implicit
else
+ifeq ($(TARGET),linux2628)
+ # This is for standard Linux >= 2.6.28 with netfilter, epoll, tproxy and splice
+ USE_GETSOCKNAME = implicit
+ USE_NETFILTER = implicit
+ USE_POLL = implicit
+ USE_EPOLL = implicit
+ USE_SEPOLL = implicit
+ USE_TPROXY = implicit
+ USE_LIBCRYPT = implicit
+ USE_LINUX_SPLICE= implicit
+ USE_LINUX_TPROXY= implicit
+else
ifeq ($(TARGET),solaris)
# This is for Solaris 8
# We also enable getaddrinfo() which works since solaris 8.
@@ -254,6 +266,7 @@
endif # openbsd
endif # freebsd
endif # solaris
+endif # linux2628
endif # linux26
endif # linux24e
endif # linux24
@@ -505,7 +518,7 @@
@echo
@echo "Please choose the target among the following supported list :"
@echo
- @echo " linux26, linux24, linux24e, linux22, solaris"
+ @echo " linux2628, linux26, linux24, linux24e, linux22, solaris"
@echo " freebsd, openbsd, cygwin, custom, generic"
@echo
@echo "Use \"generic\" if you don't want any optimization, \"custom\" if you"
diff --git a/README b/README
index f2465d2..ca6312d 100644
--- a/README
+++ b/README
@@ -1,9 +1,9 @@
----------------------
HAProxy how-to
----------------------
- version 1.5-dev7
+ version 1.5-dev11
willy tarreau
- 2011/09/10
+ 2012/06/04
1) How to build it
@@ -25,6 +25,7 @@
- linux24 for Linux 2.4 and above (default)
- linux24e for Linux 2.4 with support for a working epoll (> 0.21)
- linux26 for Linux 2.6 and above
+ - linux2628 for Linux 2.6.28 and above (enables splice and tproxy)
- solaris for Solaris 8 or 10 (others untested)
- freebsd for FreeBSD 5 to 8.0 (others untested)
- openbsd for OpenBSD 3.1 to 4.6 (others untested)