debian/0000775000000000000000000000000012615471456007203 5ustar debian/source/0000775000000000000000000000000012272122102010457 5ustar debian/source/format0000664000000000000000000000001412272122102011665 0ustar 3.0 (quilt) debian/patches/0000775000000000000000000000000012341300377010617 5ustar debian/patches/fix_manpage_errors0000664000000000000000000000064712272122102014412 0ustar --- a/doc/man/man5/keepalived.conf.5 +++ b/doc/man/man5/keepalived.conf.5 @@ -117,7 +117,7 @@ Here are described two IPs (on inside_network and on outside_network), on machine "my_hostname", which belong to the group VG_1 and which will transition together on any state change. -.PPa +.PP #You will need to write another block for outside_network. vrrp_instance inside_network { # Initial state, MASTER|BACKUP debian/patches/libnl3.patch0000664000000000000000000000213112272122102013007 0ustar Description: Support libnl version 2.0 and higher Author: Marc - A. Dahlhaus Forwarded: http://article.gmane.org/gmane.linux.keepalived.devel/3522 Last-Update: 2011-12-21 --- a/configure.in +++ b/configure.in @@ -61,9 +61,16 @@ USE_NL="LIBIPVS_USE_NL" LIBS="$LIBS -lnl" ], - [ - USE_NL="LIBIPVS_DONTUSE_NL" - AC_MSG_WARN([keepalived will be built without libnl support.]) + [AC_CHECK_LIB(nl-3, nl_socket_alloc, + [ + USE_NL="LIBIPVS_USE_NL" + CFLAGS="$CFLAGS -I/usr/include/libnl3 -DLIBNL2" + LIBS="$LIBS -lnl-3 -lnl-genl-3" + ], + [ + USE_NL="LIBIPVS_DONTUSE_NL" + AC_MSG_WARN([keepalived will be built without libnl support.]) + ]) ]) dnl ----[ Kernel version check ]---- --- a/keepalived/libipvs-2.6/libipvs.c +++ b/keepalived/libipvs-2.6/libipvs.c @@ -34,6 +34,11 @@ struct ip_vs_getinfo ipvs_info; #ifdef LIBIPVS_USE_NL +# ifdef LIBNL2 +# define nl_handle nl_sock +# define nl_handle_alloc nl_socket_alloc +# define nl_handle_destroy nl_socket_free +# endif struct nl_handle *sock = NULL; int family, try_nl = 1; #endif debian/patches/series0000664000000000000000000000000012341300377012022 0ustar debian/patches/99_linux_2.6_compat0000664000000000000000000000046612272122102014147 0ustar --- a/keepalived/vrrp/vrrp_arp.c +++ b/keepalived/vrrp/vrrp_arp.c @@ -23,6 +23,9 @@ /* system includes */ #include +/* Work around incompatibility between linux/types.h and sys/types.h */ +#define __KERNEL_STRICT_NAMES + /* local includes */ #include "logger.h" #include "memory.h" debian/init.d0000664000000000000000000000411112272122102010264 0ustar #! /bin/sh # # keepalived LVS cluster monitor daemon. # # Written by Andres Salomon # ### BEGIN INIT INFO # Provides: keepalived # Required-Start: $syslog $network $remote_fs # Required-Stop: $syslog $network $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Starts keepalived # Description: Starts keepalived lvs loadbalancer ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/keepalived NAME=keepalived DESC=keepalived CONFIG=/etc/keepalived/keepalived.conf TMPFILES="/tmp/.vrrp /tmp/.healthcheckers" #includes lsb functions . /lib/lsb/init-functions test -f $CONFIG || exit 0 test -f $DAEMON || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" for file in $TMPFILES do test -e $file && test ! -L $file && rm $file done if start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- $DAEMON_ARGS; then log_end_msg 0 else log_end_msg 1 fi ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" if start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON; then log_end_msg 0 else log_end_msg 1 fi ;; reload|force-reload) log_action_begin_msg "Reloading $DESC configuration..." if start-stop-daemon --stop --quiet --signal 1 --pidfile \ /var/run/$NAME.pid --exec $DAEMON; then log_end_msg 0 else log_action_end_msg 1 fi ;; restart) log_action_begin_msg "Restarting $DESC" "$NAME" start-stop-daemon --stop --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON || true sleep 1 if start-stop-daemon --start --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_ARGS; then log_end_msg 0 else log_end_msg 1 fi ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac exit 0 debian/compat0000664000000000000000000000000212272122102010355 0ustar 9 debian/control0000664000000000000000000000240112341300377010570 0ustar Source: keepalived Section: admin Priority: extra Maintainer: Alexander Wirt Build-Depends: autoconf, debhelper (>= 9), libnl-3-dev, libnl-genl-3-dev, libpopt-dev, libsnmp-dev, libssl-dev, linux-libc-dev, dh-autoreconf, pkg-config Standards-Version: 3.9.5 Vcs-Browser: https://github.com/formorer/pkg-keepalived Vcs-Git: git://github.com/formorer/pkg-keepalived.git Homepage: http://keepalived.org Package: keepalived Section: admin Architecture: any Depends: iproute, ipvsadm, ${misc:Depends}, ${shlibs:Depends} Description: Failover and monitoring daemon for LVS clusters keepalived is used for monitoring real servers within a Linux Virtual Server (LVS) cluster. keepalived can be configured to remove real servers from the cluster pool if it stops responding, as well as send a notification email to make the admin aware of the service failure. . In addition, keepalived implements an independent Virtual Router Redundancy Protocol (VRRPv2; see rfc2338 for additional info) framework for director failover. . You need a kernel >= 2.4.28 or >= 2.6.11 for keepalived. See README.Debian for more information. debian/watch0000664000000000000000000000010412272122102010203 0ustar version=3 http://www.keepalived.org/software/keepalived-(.*).tar.gz debian/changelog0000664000000000000000000003065412615471456011065 0ustar keepalived (1:1.2.13-1~ubuntu14.04.1) trusty-backports; urgency=medium * No-change backport to trusty (LP: #1481050) -- Micah Gersten Sun, 01 Nov 2015 14:16:46 -0600 keepalived (1:1.2.13-1) unstable; urgency=medium * [1e9c32b] Imported Upstream version 1.2.11 * [bac64d6] Imported Upstream version 1.2.13 - keep retry in case of early TCP failures in checks (Closes: #626466 #504069) - Add To header for SMTP alerts. (Closes: #627169) - handle passwords up to 8 characters (Closes: #614562) - modprobe handling fixed (Closes: #714377) - Support more than 31 interfaces (Closes: #723106) - Fix ipv6 realserver handling (Closes: #740258) - extend ip parser to support default and default6 (Closes: #740573) * [65d5b11] Add pkg-config to build-deps * [af497e7] Disable obsolete patches * [4761254] Bump standards version (no changes) -- Alexander Wirt Wed, 28 May 2014 09:01:38 +0200 keepalived (1:1.2.9-1) unstable; urgency=low * [8cd7bad] Imported Upstream version 1.2.9 -- Alexander Wirt Mon, 11 Nov 2013 22:45:58 +0100 keepalived (1:1.2.8-1) unstable; urgency=low * [b25f231] Patch configure.in instead of configure * [aa70432] Fix configure * [3a728cd] Enable sha1 support * [e257779] Add Homepage field * Allow providing of daemon args via /etc/defaul/keepalived Closes: #693877 * Import upstream version 1.2.8 (Closes: #721966) - Fix reload handling (Closes: #652260) -- Alexander Wirt Fri, 13 Sep 2013 08:54:19 +0200 keepalived (1:1.2.7-1) unstable; urgency=low * [b46efb0] Imported Upstream version 1.2.7 - Don't use bind() with AF_UNSPEC (Closes: #699540) - new upstream version (Closes: #703085) * [6058efd] wrap-and-sort * [a128718] Build with snmp support * [d9783f9] Remove obsolete patches * [2deaa4e] Move to dh and 3.0(quilt) * [cd5a314] Use libnl3 (Closes: #688164) * [d6493e1] Convert package to dh and quilt(3.0) * [e7f5489] Bump dh compat to dh9 * [f6ca92d] Bump standards version * [525415b] Fix errors in manpage * [35dbfe3] Remove unneeded files -- Alexander Wirt Mon, 01 Jul 2013 22:02:02 +0200 keepalived (1:1.2.6-1) experimental; urgency=low * [b72cd7a] Remove obsolete patches * [0cadef0] Enable snmp support * [7442e85] Build-depend against libsnmp-dev * [b84e381] Imported Upstream version 1.2.4 * [9f29e62] Imported Upstream version 1.2.6 -- Alexander Wirt Tue, 21 Aug 2012 18:14:42 +0200 keepalived (1:1.2.2-3) unstable; urgency=low * [c28d5f0] Readd ip_vs.h - this reenables ipvs (Closes: #649778) -- Alexander Wirt Sun, 18 Dec 2011 16:18:06 +0100 keepalived (1:1.2.2-2) unstable; urgency=low * [9db4134] Fix override disparity * [8f0c721] Remove obsolete patch * [897c0a0] Set correct permissions on pid file. This is a fix for CVE-2011-1784. (Closes: #626281) * [5ab4b8d] Don't use modprobe -k. Thanks to Sven Ulland for the patch * [c87fe40] Add vcs headers to control file * [8107104] Bump standards version - no changes -- Alexander Wirt Thu, 10 Nov 2011 08:38:47 +0100 keepalived (1:1.2.2-1) unstable; urgency=low * New upstream version * Don't remove configure in clean target * Refresh 95_use_linux_ip_vs_h.patch for 1.2 * Build depend on libnl-dev -- Alexander Wirt Sun, 06 Mar 2011 17:43:35 +0100 keepalived (1:1.1.20-1) unstable; urgency=low * Go back to 1.1.20 since 1.2.0 is not ready for release * Bump standards version (no changes) -- Alexander Wirt Sat, 14 Aug 2010 10:17:10 +0200 keepalived (1.2.0-1) unstable; urgency=low * New upstream release (Closes: #580607) * Bump standards version (no changes) -- Alexander Wirt Sun, 04 Jul 2010 11:02:13 +0200 keepalived (1.1.20-1) unstable; urgency=low * New upstream release (Closes: #580607) * Bump standards version (no changes) * Raise debhelper dep to v5 * Refresh 95_use_linux_ip_vs_h.patch * Fix typo in description * Declare debsource v1.0 * Fix restart if daemon doesn't run (Closes: #561357) -- Alexander Wirt Sat, 08 May 2010 20:56:58 +0200 keepalived (1.1.19-1) unstable; urgency=low * New upstream version (Closes: #557814, #548254) - Fix gigabit status interface support (Closes: #555634) * Fix error reporting and manpage of genhash (Closes: #575399) -- Alexander Wirt Fri, 23 Apr 2010 13:17:53 +0200 keepalived (1.1.17-2) unstable; urgency=low * Reenable ipvs support thanks to Vincent Bernat for the hint (Closes: #530738) -- Alexander Wirt Thu, 28 May 2009 09:55:52 +0200 keepalived (1.1.17-1) unstable; urgency=low * New upstream release (Closes: #516102). Thanks to Vincent Bernat for the help * Bump standards version (no changes) * Remove outdated README.Debian (Closes: #470626) * support nostrip option (Closes: #478261) Thanks to Vincent Bernat for the patch * Extract the patch for 336885 into debian/patches (Closes: #510092) -- Alexander Wirt Sun, 26 Apr 2009 19:41:12 +0200 keepalived (1.1.15-1) unstable; urgency=low * New upstream release (Closes: #401827) * Remove 00_fix-manpagepath.patch and 01_fix-genhash-manpagepath.patch(obsolete) * Bump standards version -- Alexander Wirt Tue, 18 Dec 2007 18:44:55 +0100 keepalived (1.1.13-1) unstable; urgency=low * New upstream release (Closes: #401827) * Add patch to compile with libc6-dev. Thanks to Cyril Brulebois for the original patch (Closes: #428927) -- Alexander Wirt Tue, 24 Jul 2007 22:24:08 +0200 keepalived (1.1.12-1) unstable; urgency=low * New upstream release (Closes: #365220) * Call notification for every failure. Thanks to Len Sorenson for the patch (Closes: #336885) * delete /tmp/.vrrp and /tmp/.healthcheckers if they exists before starting keepalived (Closes: #333102) * bumped standard version -- Alexander Wirt Wed, 28 Jun 2006 20:01:56 +0200 keepalived (1.1.11-3) unstable; urgency=low * Added a warning about sarge kernels to README.Debian and the package description -- Alexander Wirt Fri, 29 Apr 2005 23:22:40 +0200 keepalived (1.1.11-2) unstable; urgency=low * Added iproute to dependency (Closes: #303421) -- Alexander Wirt Fri, 8 Apr 2005 21:45:33 +0200 keepalived (1.1.11-1) unstable; urgency=low * New upstream release (Closes: #297067) - Fixes several bugs with his childs which should fix restart und fork bugs (Closes: #296516) * Updated to iv_vs.h 0x010201 (2.6.11) -- Alexander Wirt Wed, 2 Mar 2005 21:41:29 +0100 keepalived (1.1.7-3) unstable; urgency=low * No longer install the config per default (Closes: #261615) -- Alexander Wirt Sat, 14 Aug 2004 20:36:43 +0200 keepalived (1.1.7-2) unstable; urgency=low * New Maintainer: Alexander Wirt No Bugs, no problems with this package. Thanks for the good work Andres, I'm happy to take this package -- Alexander Wirt Wed, 19 May 2004 20:32:03 +0200 keepalived (1.1.7-1) unstable; urgency=low * New upstream release. * 003-genhash_8.patch: drop genhash manpage, as it's been merged upstream. * 001-genhash_1.patch: add new manpage location fix; should be genhash(1). -- Andres Salomon Sun, 02 May 2004 23:44:39 -0400 keepalived (1.1.6-1) unstable; urgency=low * New upstream release. * Drop 001-really_distclean.patch and 002-use_destdir.patch; merged upstream. * 003-genhash_8.patch: add genhash manpage. * Update ip_vs.h to version from 2.6.4-1. Keepalived now compiles using 2.6 headers. Update description accordingly. * Update copyright file. * Make init script not check if kernel has IPVS support (closes: #237141). -- Andres Salomon Tue, 30 Mar 2004 22:05:24 -0500 keepalived (1.1.5-2) unstable; urgency=low * Can't use kernel-headers package, not all arch have it. Revert back to storing headers in debian/ subdir. -- Andres Salomon Tue, 10 Feb 2004 02:38:14 -0500 keepalived (1.1.5-1) unstable; urgency=low * New upstream release. (Closes: #231418) * Now that ipvs is in 2.4, use kernel-headers package instead of storing kernel headers in debian/ subdir. Add appropriate build-dep. * Convert buildsys to cdbs and update standards-version. * 001-really_distclean.patch: clean binaries out of ./bin. * 002-use_destdir.patch: add DESTDIR to makefiles. * Upstream now has manpages for keepalived and keepalived.conf. -- Andres Salomon Fri, 30 Jan 2004 02:51:47 -0500 keepalived (1.0.3-1) unstable; urgency=low * New upstream release; I'm going to wait for this release to enter testing before allowing the 1.1.x series into unstable. (Closes: #199437) * Update maintainer email address. * Update standards-version. * Update kernel headers and scripts. -- Andres Salomon Sat, 26 Jul 2003 01:03:19 -0400 keepalived (1.0.2-1) unstable; urgency=low * New upstream release. * Fixed previous changelog entry's year (2002 -> 2003), so it doesn's appear that I time travel. At the very least, I wouldn't want people discovering my secret, and risk my time machine falling into the wrong hands. * Upstream docs changed location; updated. * Dropped dh_undocumented usage. * Added reload support to the init script. -- Andres Salomon Thu, 17 Apr 2003 00:38:48 -0500 keepalived (1.0.0-1) unstable; urgency=low * New upstream release. * Update standards-version to 3.5.8.0. * Update kernel headers for ipvs-1.0.7. -- Andres Salomon Fri, 17 Jan 2003 15:26:38 -0400 keepalived (0.7.6-1) unstable; urgency=low * New upstream release. * Several minor description/copyright changes to make new lintian happy. * Add removal of config.log to clean target in debian/rules. -- Andres Salomon Sun, 8 Dec 2002 23:59:17 -0400 keepalived (0.7.1-1) unstable; urgency=low * New upstream release. * Update kernel headers for ipvs-1.0.6. * Remove dependance upon gcc-3.0; upstream says 2.95 works fine now, and we should be transitioning to gcc-3.2 soon, anyways (hopefully). -- Andres Salomon Sat, 21 Sep 2002 16:05:52 -0400 keepalived (0.6.10-2) unstable; urgency=low * Add OpenSSL exception clause to the copyright file. -- Andres Salomon Thu, 22 Aug 2002 11:48:16 -0400 keepalived (0.6.10-1) unstable; urgency=low * New upstream release. * Update kernel headers to 2.4.19 and ipvs-1.0.4. -- Andres Salomon Wed, 14 Aug 2002 23:42:48 -0400 keepalived (0.6.8-1) unstable; urgency=low * New upstream release. * Updated description to mention VRRPv2. * Depend upon gcc-3.0, since gcc-2.95 and keepalived have, uh, issues. * Updated various paths to reflect changed build system/layout. -- Andres Salomon Thu, 18 Jul 2002 01:47:42 -0500 keepalived (0.6.2-1) unstable; urgency=low * New upstream release, upload to archive. (Closes: #144100) * Autoconf sanity upstream, remove configure.in/Makefile.in patches. * Fix typo in top level Makefile.in. * Updated URL for keepalived (keepalived.sf.net -> www.keepalived.org). * For easier maintenance of kernel header files, grab scripts from my devmapper package. -- Andres Salomon Sun, 16 Jun 2002 15:47:39 -0500 keepalived (0.5.8-1) unstable; urgency=low * New upstream release. * Note the OpenSSL exception clause in the README. -- Andres Salomon Tue, 21 May 2002 15:18:02 -0500 keepalived (0.5.7-1) unstable; urgency=low * New upstream release (w/ SSL_GET fixes!). * Moved sample configs to doc directory. -- Andres Salomon Thu, 2 May 2002 20:14:38 -0500 keepalived (0.5.6-1) unstable; urgency=low * New upstream release. -- Andres Salomon Thu, 11 Apr 2002 01:38:19 -0500 keepalived (0.5.5-1) unstable; urgency=low * Initial Release. -- Andres Salomon Thu, 11 Apr 2002 01:38:19 -0500 debian/include/0000775000000000000000000000000012272122102010602 5ustar debian/include/net/0000775000000000000000000000000012272122102011370 5ustar debian/include/net/ip_vs.h0000664000000000000000000003030712272122102012664 0ustar /* * IP Virtual Server * data structure and functionality definitions */ #ifndef _IP_VS_H #define _IP_VS_H #include /* For __beXX types in userland */ #define IP_VS_VERSION_CODE 0x010201 #define NVERSION(version) \ (version >> 16) & 0xFF, \ (version >> 8) & 0xFF, \ version & 0xFF /* * Virtual Service Flags */ #define IP_VS_SVC_F_PERSISTENT 0x0001 /* persistent port */ #define IP_VS_SVC_F_HASHED 0x0002 /* hashed entry */ #define IP_VS_SVC_F_ONEPACKET 0x0004 /* one-packet scheduling */ /* * Destination Server Flags */ #define IP_VS_DEST_F_AVAILABLE 0x0001 /* server is available */ #define IP_VS_DEST_F_OVERLOAD 0x0002 /* server is overloaded */ /* * IPVS sync daemon states */ #define IP_VS_STATE_NONE 0x0000 /* daemon is stopped */ #define IP_VS_STATE_MASTER 0x0001 /* started as master */ #define IP_VS_STATE_BACKUP 0x0002 /* started as backup */ /* * IPVS socket options */ #define IP_VS_BASE_CTL (64+1024+64) /* base */ #define IP_VS_SO_SET_NONE IP_VS_BASE_CTL /* just peek */ #define IP_VS_SO_SET_INSERT (IP_VS_BASE_CTL+1) #define IP_VS_SO_SET_ADD (IP_VS_BASE_CTL+2) #define IP_VS_SO_SET_EDIT (IP_VS_BASE_CTL+3) #define IP_VS_SO_SET_DEL (IP_VS_BASE_CTL+4) #define IP_VS_SO_SET_FLUSH (IP_VS_BASE_CTL+5) #define IP_VS_SO_SET_LIST (IP_VS_BASE_CTL+6) #define IP_VS_SO_SET_ADDDEST (IP_VS_BASE_CTL+7) #define IP_VS_SO_SET_DELDEST (IP_VS_BASE_CTL+8) #define IP_VS_SO_SET_EDITDEST (IP_VS_BASE_CTL+9) #define IP_VS_SO_SET_TIMEOUT (IP_VS_BASE_CTL+10) #define IP_VS_SO_SET_STARTDAEMON (IP_VS_BASE_CTL+11) #define IP_VS_SO_SET_STOPDAEMON (IP_VS_BASE_CTL+12) #define IP_VS_SO_SET_RESTORE (IP_VS_BASE_CTL+13) #define IP_VS_SO_SET_SAVE (IP_VS_BASE_CTL+14) #define IP_VS_SO_SET_ZERO (IP_VS_BASE_CTL+15) #define IP_VS_SO_SET_MAX IP_VS_SO_SET_ZERO #define IP_VS_SO_GET_VERSION IP_VS_BASE_CTL #define IP_VS_SO_GET_INFO (IP_VS_BASE_CTL+1) #define IP_VS_SO_GET_SERVICES (IP_VS_BASE_CTL+2) #define IP_VS_SO_GET_SERVICE (IP_VS_BASE_CTL+3) #define IP_VS_SO_GET_DESTS (IP_VS_BASE_CTL+4) #define IP_VS_SO_GET_DEST (IP_VS_BASE_CTL+5) /* not used now */ #define IP_VS_SO_GET_TIMEOUT (IP_VS_BASE_CTL+6) #define IP_VS_SO_GET_DAEMON (IP_VS_BASE_CTL+7) #define IP_VS_SO_GET_MAX IP_VS_SO_GET_DAEMON /* * IPVS Connection Flags * Only flags 0..15 are sent to backup server */ #define IP_VS_CONN_F_FWD_MASK 0x0007 /* mask for the fwd methods */ #define IP_VS_CONN_F_MASQ 0x0000 /* masquerading/NAT */ #define IP_VS_CONN_F_LOCALNODE 0x0001 /* local node */ #define IP_VS_CONN_F_TUNNEL 0x0002 /* tunneling */ #define IP_VS_CONN_F_DROUTE 0x0003 /* direct routing */ #define IP_VS_CONN_F_BYPASS 0x0004 /* cache bypass */ #define IP_VS_CONN_F_SYNC 0x0020 /* entry created by sync */ #define IP_VS_CONN_F_HASHED 0x0040 /* hashed entry */ #define IP_VS_CONN_F_NOOUTPUT 0x0080 /* no output packets */ #define IP_VS_CONN_F_INACTIVE 0x0100 /* not established */ #define IP_VS_CONN_F_OUT_SEQ 0x0200 /* must do output seq adjust */ #define IP_VS_CONN_F_IN_SEQ 0x0400 /* must do input seq adjust */ #define IP_VS_CONN_F_SEQ_MASK 0x0600 /* in/out sequence mask */ #define IP_VS_CONN_F_NO_CPORT 0x0800 /* no client port set yet */ #define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */ #define IP_VS_CONN_F_ONE_PACKET 0x2000 /* forward only one packet */ #define IP_VS_CONN_F_BACKUP_MASK (IP_VS_CONN_F_FWD_MASK | \ IP_VS_CONN_F_NOOUTPUT | \ IP_VS_CONN_F_INACTIVE | \ IP_VS_CONN_F_SEQ_MASK | \ IP_VS_CONN_F_NO_CPORT | \ IP_VS_CONN_F_TEMPLATE \ ) /* Flags that are not sent to backup server start from bit 16 */ #define IP_VS_CONN_F_NFCT (1 << 16) /* use netfilter conntrack */ /* Connection flags from destination that can be changed by user space */ #define IP_VS_CONN_F_DEST_MASK (IP_VS_CONN_F_FWD_MASK | \ IP_VS_CONN_F_ONE_PACKET | \ IP_VS_CONN_F_NFCT | \ 0) #define IP_VS_SCHEDNAME_MAXLEN 16 #define IP_VS_PENAME_MAXLEN 16 #define IP_VS_IFNAME_MAXLEN 16 #define IP_VS_PEDATA_MAXLEN 255 /* * The struct ip_vs_service_user and struct ip_vs_dest_user are * used to set IPVS rules through setsockopt. */ struct ip_vs_service_user { /* virtual service addresses */ __u16 protocol; __be32 addr; /* virtual ip address */ __be16 port; __u32 fwmark; /* firwall mark of service */ /* virtual service options */ char sched_name[IP_VS_SCHEDNAME_MAXLEN]; unsigned flags; /* virtual service flags */ unsigned timeout; /* persistent timeout in sec */ __be32 netmask; /* persistent netmask */ }; struct ip_vs_dest_user { /* destination server address */ __be32 addr; __be16 port; /* real server options */ unsigned conn_flags; /* connection flags */ int weight; /* destination weight */ /* thresholds for active connections */ __u32 u_threshold; /* upper threshold */ __u32 l_threshold; /* lower threshold */ }; /* * IPVS statistics object (for user space) */ struct ip_vs_stats_user { __u32 conns; /* connections scheduled */ __u32 inpkts; /* incoming packets */ __u32 outpkts; /* outgoing packets */ __u64 inbytes; /* incoming bytes */ __u64 outbytes; /* outgoing bytes */ __u32 cps; /* current connection rate */ __u32 inpps; /* current in packet rate */ __u32 outpps; /* current out packet rate */ __u32 inbps; /* current in byte rate */ __u32 outbps; /* current out byte rate */ }; /* The argument to IP_VS_SO_GET_INFO */ struct ip_vs_getinfo { /* version number */ unsigned int version; /* size of connection hash table */ unsigned int size; /* number of virtual services */ unsigned int num_services; }; /* The argument to IP_VS_SO_GET_SERVICE */ struct ip_vs_service_entry { /* which service: user fills in these */ __u16 protocol; __be32 addr; /* virtual address */ __be16 port; __u32 fwmark; /* firwall mark of service */ /* service options */ char sched_name[IP_VS_SCHEDNAME_MAXLEN]; unsigned flags; /* virtual service flags */ unsigned timeout; /* persistent timeout */ __be32 netmask; /* persistent netmask */ /* number of real servers */ unsigned int num_dests; /* statistics */ struct ip_vs_stats_user stats; }; struct ip_vs_dest_entry { __be32 addr; /* destination address */ __be16 port; unsigned conn_flags; /* connection flags */ int weight; /* destination weight */ __u32 u_threshold; /* upper threshold */ __u32 l_threshold; /* lower threshold */ __u32 activeconns; /* active connections */ __u32 inactconns; /* inactive connections */ __u32 persistconns; /* persistent connections */ /* statistics */ struct ip_vs_stats_user stats; }; /* The argument to IP_VS_SO_GET_DESTS */ struct ip_vs_get_dests { /* which service: user fills in these */ __u16 protocol; __be32 addr; /* virtual address */ __be16 port; __u32 fwmark; /* firwall mark of service */ /* number of real servers */ unsigned int num_dests; /* the real servers */ struct ip_vs_dest_entry entrytable[0]; }; /* The argument to IP_VS_SO_GET_SERVICES */ struct ip_vs_get_services { /* number of virtual services */ unsigned int num_services; /* service table */ struct ip_vs_service_entry entrytable[0]; }; /* The argument to IP_VS_SO_GET_TIMEOUT */ struct ip_vs_timeout_user { int tcp_timeout; int tcp_fin_timeout; int udp_timeout; }; /* The argument to IP_VS_SO_GET_DAEMON */ struct ip_vs_daemon_user { /* sync daemon state (master/backup) */ int state; /* multicast interface name */ char mcast_ifn[IP_VS_IFNAME_MAXLEN]; /* SyncID we belong to */ int syncid; }; /* * * IPVS Generic Netlink interface definitions * */ /* Generic Netlink family info */ #define IPVS_GENL_NAME "IPVS" #define IPVS_GENL_VERSION 0x1 struct ip_vs_flags { __be32 flags; __be32 mask; }; /* Generic Netlink command attributes */ enum { IPVS_CMD_UNSPEC = 0, IPVS_CMD_NEW_SERVICE, /* add service */ IPVS_CMD_SET_SERVICE, /* modify service */ IPVS_CMD_DEL_SERVICE, /* delete service */ IPVS_CMD_GET_SERVICE, /* get service info */ IPVS_CMD_NEW_DEST, /* add destination */ IPVS_CMD_SET_DEST, /* modify destination */ IPVS_CMD_DEL_DEST, /* delete destination */ IPVS_CMD_GET_DEST, /* get destination info */ IPVS_CMD_NEW_DAEMON, /* start sync daemon */ IPVS_CMD_DEL_DAEMON, /* stop sync daemon */ IPVS_CMD_GET_DAEMON, /* get sync daemon status */ IPVS_CMD_SET_CONFIG, /* set config settings */ IPVS_CMD_GET_CONFIG, /* get config settings */ IPVS_CMD_SET_INFO, /* only used in GET_INFO reply */ IPVS_CMD_GET_INFO, /* get general IPVS info */ IPVS_CMD_ZERO, /* zero all counters and stats */ IPVS_CMD_FLUSH, /* flush services and dests */ __IPVS_CMD_MAX, }; #define IPVS_CMD_MAX (__IPVS_CMD_MAX - 1) /* Attributes used in the first level of commands */ enum { IPVS_CMD_ATTR_UNSPEC = 0, IPVS_CMD_ATTR_SERVICE, /* nested service attribute */ IPVS_CMD_ATTR_DEST, /* nested destination attribute */ IPVS_CMD_ATTR_DAEMON, /* nested sync daemon attribute */ IPVS_CMD_ATTR_TIMEOUT_TCP, /* TCP connection timeout */ IPVS_CMD_ATTR_TIMEOUT_TCP_FIN, /* TCP FIN wait timeout */ IPVS_CMD_ATTR_TIMEOUT_UDP, /* UDP timeout */ __IPVS_CMD_ATTR_MAX, }; #define IPVS_CMD_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1) /* * Attributes used to describe a service * * Used inside nested attribute IPVS_CMD_ATTR_SERVICE */ enum { IPVS_SVC_ATTR_UNSPEC = 0, IPVS_SVC_ATTR_AF, /* address family */ IPVS_SVC_ATTR_PROTOCOL, /* virtual service protocol */ IPVS_SVC_ATTR_ADDR, /* virtual service address */ IPVS_SVC_ATTR_PORT, /* virtual service port */ IPVS_SVC_ATTR_FWMARK, /* firewall mark of service */ IPVS_SVC_ATTR_SCHED_NAME, /* name of scheduler */ IPVS_SVC_ATTR_FLAGS, /* virtual service flags */ IPVS_SVC_ATTR_TIMEOUT, /* persistent timeout */ IPVS_SVC_ATTR_NETMASK, /* persistent netmask */ IPVS_SVC_ATTR_STATS, /* nested attribute for service stats */ IPVS_SVC_ATTR_PE_NAME, /* name of ct retriever */ __IPVS_SVC_ATTR_MAX, }; #define IPVS_SVC_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1) /* * Attributes used to describe a destination (real server) * * Used inside nested attribute IPVS_CMD_ATTR_DEST */ enum { IPVS_DEST_ATTR_UNSPEC = 0, IPVS_DEST_ATTR_ADDR, /* real server address */ IPVS_DEST_ATTR_PORT, /* real server port */ IPVS_DEST_ATTR_FWD_METHOD, /* forwarding method */ IPVS_DEST_ATTR_WEIGHT, /* destination weight */ IPVS_DEST_ATTR_U_THRESH, /* upper threshold */ IPVS_DEST_ATTR_L_THRESH, /* lower threshold */ IPVS_DEST_ATTR_ACTIVE_CONNS, /* active connections */ IPVS_DEST_ATTR_INACT_CONNS, /* inactive connections */ IPVS_DEST_ATTR_PERSIST_CONNS, /* persistent connections */ IPVS_DEST_ATTR_STATS, /* nested attribute for dest stats */ __IPVS_DEST_ATTR_MAX, }; #define IPVS_DEST_ATTR_MAX (__IPVS_DEST_ATTR_MAX - 1) /* * Attributes describing a sync daemon * * Used inside nested attribute IPVS_CMD_ATTR_DAEMON */ enum { IPVS_DAEMON_ATTR_UNSPEC = 0, IPVS_DAEMON_ATTR_STATE, /* sync daemon state (master/backup) */ IPVS_DAEMON_ATTR_MCAST_IFN, /* multicast interface name */ IPVS_DAEMON_ATTR_SYNC_ID, /* SyncID we belong to */ __IPVS_DAEMON_ATTR_MAX, }; #define IPVS_DAEMON_ATTR_MAX (__IPVS_DAEMON_ATTR_MAX - 1) /* * Attributes used to describe service or destination entry statistics * * Used inside nested attributes IPVS_SVC_ATTR_STATS and IPVS_DEST_ATTR_STATS */ enum { IPVS_STATS_ATTR_UNSPEC = 0, IPVS_STATS_ATTR_CONNS, /* connections scheduled */ IPVS_STATS_ATTR_INPKTS, /* incoming packets */ IPVS_STATS_ATTR_OUTPKTS, /* outgoing packets */ IPVS_STATS_ATTR_INBYTES, /* incoming bytes */ IPVS_STATS_ATTR_OUTBYTES, /* outgoing bytes */ IPVS_STATS_ATTR_CPS, /* current connection rate */ IPVS_STATS_ATTR_INPPS, /* current in packet rate */ IPVS_STATS_ATTR_OUTPPS, /* current out packet rate */ IPVS_STATS_ATTR_INBPS, /* current in byte rate */ IPVS_STATS_ATTR_OUTBPS, /* current out byte rate */ __IPVS_STATS_ATTR_MAX, }; #define IPVS_STATS_ATTR_MAX (__IPVS_STATS_ATTR_MAX - 1) /* Attributes used in response to IPVS_CMD_GET_INFO command */ enum { IPVS_INFO_ATTR_UNSPEC = 0, IPVS_INFO_ATTR_VERSION, /* IPVS version number */ IPVS_INFO_ATTR_CONN_TAB_SIZE, /* size of connection hash table */ __IPVS_INFO_ATTR_MAX, }; #define IPVS_INFO_ATTR_MAX (__IPVS_INFO_ATTR_MAX - 1) #endif /* _IP_VS_H */ debian/docs0000664000000000000000000000010112272122102010022 0ustar AUTHOR CONTRIBUTORS TODO README doc/keepalived.conf* doc/samples debian/copyright0000664000000000000000000000270312272122102011114 0ustar This package was debianized by Andres Salomon on Thu, 11 Apr 2002 01:38:19 -0400. And is now maintained from Alexander Wirt on Do Mai 20 00:51:09 CEST 2004 It was downloaded from http://www.keepalived.org/ Upstream Author: Alexandre Cassen Copyright (C) 2001-2004 Alexandre Cassen keepalived is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. keepalived is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian systems, the full text of the GPL can be found in /usr/share/common-licenses/GPL Additionally, the following clause applies: In addition, as the copyright holder of Keepalived, I, Alexandre Cassen, , grant the following special exception: I, Alexandre Cassen, , explicitly allow the compilation and distribution of the Keepalived software with the OpenSSL Toolkit. debian/keepalived.default0000664000000000000000000000015212272122102012634 0ustar # Options to pass to keepalived # DAEMON_ARGS are appended to the keepalived command-line DAEMON_ARGS="" debian/dirs0000664000000000000000000000010112272122102010033 0ustar usr/bin usr/sbin etc/keepalived usr/share/doc/keepalived/samples debian/rules0000775000000000000000000000076412272124753010264 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 #export DH_OPTIONS=-v %: dh $@ --with autoreconf override_dh_auto_configure: dh_auto_configure -- --with-kernel-dir=debian/ --enable-snmp --enable-sha1 override_dh_auto_install: dh_auto_install rm -rf debian/keepalived/etc/keepalived/samples/ rm -rf debian/keepalived/etc/rc.d rm -rf debian/keepalived/etc/keepalived/keepalived.conf rm -rf debian/keepalived/etc/sysconfig rm -rf debian/keepalived/usr/man