keepalived-1.1.14 v1.1.14
authorAlexandre Cassen <acassen@freebox.fr>
Thu, 13 Sep 2007 15:58:27 +0000 (17:58 +0200)
committerAlexandre Cassen <acassen@freebox.fr>
Mon, 28 Sep 2009 08:59:01 +0000 (10:59 +0200)
* keepalived-1.1.14 released.
* Shinji Tanaka, <stanaka at hatena.ne.jp> extended parsing
  framework to support "include" directives. For more
  informations and documentation please refer to Shinji
  website :
    http://misccs.dyndns.org/index.php?keepalived%20include%20patch
* Tobias Klausmann, <klausman at schwarzvogel.de> add error loggin
  while parsing configuration file.
* Merged patches from rpmforge.net on Makefile and redhat specfile.
* Create a goodies directory to store nice scripts received from
  users. Add Steve Milton (milton AT isomedia.com) arpreset script
  to delete a single ARP entry from a CISCO router.
* VRRP : David Woodhouse, <dwmw2 at redhat.com> fixed vrrp_arp
  includes.
* VRRP : Pierre-Yves Ritschard, <pyr at spootnik.org> fixed negative
  weights in script.
* VRRP : Michael Smith, <msmith at cbnco.com> extended
  virtual_ipaddress setting to support Old-style Linux interface
  aliases like eth0:1.
* VRRP : Ward Wouts, <ward.wouts at gmail.com> add support to
  vrrp_script logging.

115 files changed:
ChangeLog
VERSION
doc/keepalived.conf.SYNOPSIS
doc/man/man5/keepalived.conf.5
doc/samples/keepalived.conf.vrrp
genhash/AUTHOR
genhash/Makefile.in
genhash/http.c
genhash/http.h
genhash/layer4.c
genhash/layer4.h
genhash/main.c
genhash/main.h
genhash/sock.c
genhash/sock.h
genhash/ssl.c
genhash/ssl.h
goodies/arpreset.pl [new file with mode: 0755]
keepalived.spec.in
keepalived/Makefile.in
keepalived/check/Makefile.in
keepalived/check/check_api.c
keepalived/check/check_daemon.c
keepalived/check/check_data.c
keepalived/check/check_http.c
keepalived/check/check_misc.c
keepalived/check/check_parser.c
keepalived/check/check_smtp.c
keepalived/check/check_ssl.c
keepalived/check/check_tcp.c
keepalived/check/ipfwwrapper.c
keepalived/check/ipvswrapper.c
keepalived/check/ipwrapper.c
keepalived/core/Makefile.in
keepalived/core/daemon.c
keepalived/core/global_data.c
keepalived/core/global_parser.c
keepalived/core/layer4.c
keepalived/core/main.c
keepalived/core/pidfile.c
keepalived/core/smtp.c
keepalived/etc/init.d/keepalived.init
keepalived/etc/init.d/keepalived.sysconfig [new file with mode: 0644]
keepalived/include/check_api.h
keepalived/include/check_daemon.h
keepalived/include/check_data.h
keepalived/include/check_http.h
keepalived/include/check_misc.h
keepalived/include/check_parser.h
keepalived/include/check_smtp.h
keepalived/include/check_ssl.h
keepalived/include/check_tcp.h
keepalived/include/config.h.in
keepalived/include/daemon.h
keepalived/include/global_data.h
keepalived/include/global_parser.h
keepalived/include/ipfwwrapper.h
keepalived/include/ipvswrapper.h
keepalived/include/ipwrapper.h
keepalived/include/layer4.h
keepalived/include/main.h
keepalived/include/pidfile.h
keepalived/include/smtp.h
keepalived/include/vrrp.h
keepalived/include/vrrp_arp.h
keepalived/include/vrrp_daemon.h
keepalived/include/vrrp_data.h
keepalived/include/vrrp_if.h
keepalived/include/vrrp_index.h
keepalived/include/vrrp_ipaddress.h
keepalived/include/vrrp_iproute.h
keepalived/include/vrrp_ipsecah.h
keepalived/include/vrrp_netlink.h
keepalived/include/vrrp_notify.h
keepalived/include/vrrp_parser.h
keepalived/include/vrrp_scheduler.h
keepalived/include/vrrp_sync.h
keepalived/include/vrrp_track.h
keepalived/vrrp/Makefile.in
keepalived/vrrp/vrrp.c
keepalived/vrrp/vrrp_arp.c
keepalived/vrrp/vrrp_daemon.c
keepalived/vrrp/vrrp_data.c
keepalived/vrrp/vrrp_if.c
keepalived/vrrp/vrrp_index.c
keepalived/vrrp/vrrp_ipaddress.c
keepalived/vrrp/vrrp_iproute.c
keepalived/vrrp/vrrp_ipsecah.c
keepalived/vrrp/vrrp_netlink.c
keepalived/vrrp/vrrp_notify.c
keepalived/vrrp/vrrp_parser.c
keepalived/vrrp/vrrp_scheduler.c
keepalived/vrrp/vrrp_sync.c
keepalived/vrrp/vrrp_track.c
lib/Makefile.in
lib/html.c
lib/html.h
lib/list.c
lib/list.h
lib/memory.c
lib/memory.h
lib/notify.c
lib/notify.h
lib/parser.c
lib/parser.h
lib/scheduler.c
lib/scheduler.h
lib/signals.c
lib/signals.h
lib/timer.c
lib/timer.h
lib/utils.c
lib/utils.h
lib/vector.c
lib/vector.h

index aedbcc8..9ba7a9d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2007-09-13  Alexandre Cassen  <acassen@linux-vs.org>
+       * keepalived-1.1.14 released.
+       * Shinji Tanaka, <stanaka at hatena.ne.jp> extended parsing
+         framework to support "include" directives. For more
+         informations and documentation please refer to Shinji
+         website : 
+           http://misccs.dyndns.org/index.php?keepalived%20include%20patch
+       * Tobias Klausmann, <klausman at schwarzvogel.de> add error loggin
+         while parsing configuration file.
+       * Merged patches from rpmforge.net on Makefile and redhat specfile.
+       * Create a goodies directory to store nice scripts received from
+         users. Add Steve Milton (milton AT isomedia.com) arpreset script
+         to delete a single ARP entry from a CISCO router.
+       * VRRP : David Woodhouse, <dwmw2 at redhat.com> fixed vrrp_arp
+         includes.
+       * VRRP : Pierre-Yves Ritschard, <pyr at spootnik.org> fixed negative
+         weights in script.
+       * VRRP : Michael Smith, <msmith at cbnco.com> extended
+         virtual_ipaddress setting to support Old-style Linux interface
+         aliases like eth0:1.
+       * VRRP : Ward Wouts, <ward.wouts at gmail.com> add support to 
+         vrrp_script logging.
+
 2006-10-11  Alexandre Cassen  <acassen@linux-vs.org>
        * keepalived-1.1.13 released.
        * VRRP : Added a new notify script to be launch during vrrp
diff --git a/VERSION b/VERSION
index 9ea63db..e9bc149 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.1.13
+1.1.14
index 79184e8..e33747a 100644 (file)
@@ -165,8 +165,8 @@ vrrp_instance <STRING> {            # VRRP instance declaration
         auth_pass <STRING>             # Password string
     }
     virtual_ipaddress {                        # VRRP IP addres block
-        <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE>
-        <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE>
+        <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE> label <LABEL>
+        <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE> label <LABEL>
         ...
     }
     virtual_ipaddress_excluded {               # VRRP IP excluded from VRRP
@@ -198,6 +198,10 @@ SCOPE can take the following values :
        * nowhere
        * global
 
+LABEL is optional and creates a name for the alias. For compatibility with
+"ifconfig", it should be of the form <realdev>:<anytext>, for example
+eth0:1 for an alias on eth0.
+
 When a weight is specified in track_interface, instead of setting the vrrp
 instance to the FAULT state in case of failure, its priority will be
 increased by the weight when the interface is up (for positive weights),
index 59a2d7a..dff2951 100644 (file)
@@ -199,9 +199,9 @@ which will transition together on any state change.
     #With the same entries on other machines,\r
     #the opposite transition will be occuring.\r
     virtual_ipaddress {\r
-        <IPADDR>/<MASK> brd <IPADDR> dev <STRING> scope <SCOPE>\r
+        <IPADDR>/<MASK> brd <IPADDR> dev <STRING> scope <SCOPE> label <LABEL>\r
         192.168.200.17/24 dev eth1\r
-        192.168.200.18/24 dev eth2\r
+        192.168.200.18/24 dev eth2 label eth2:1\r
     }\r
 \r
     #VRRP IP excluded from VRRP\r
index 95a5a47..50c22fb 100644 (file)
@@ -27,6 +27,10 @@ vrrp_instance VI_1 {
         192.168.200.16
         192.168.200.17
         192.168.200.18
+
+       # optional label. should be of the form "realdev:sometext" for
+       # compatibility with ifconfig.
+       192.168.200.18 label eth0:1
     }
 }
 
index 0d64916..4a76199 100644 (file)
@@ -1 +1 @@
-Alexandre Cassen, <Alexandre.Cassen@wanadoo.fr>
+Alexandre Cassen, <acassen@freebox.fr>
index 85a5d46..6c9921e 100644 (file)
@@ -1,13 +1,14 @@
 # Makefile.in
 #
-# Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+# Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
 
 EXEC = genhash
 BIN  = ../bin
 
 prefix      = @prefix@
 exec_prefix = @exec_prefix@
-bindir     = @bindir@
+bindir      = @bindir@
+mandir      = @mandir@
 
 CC = @CC@
 STRIP = @STRIP@
@@ -17,9 +18,8 @@ CFLAGS = @CFLAGS@ @CPPFLAGS@ $(INCLUDES) \
 LDFLAGS = @LIBS@ @LDFLAGS@
 
 OBJS = main.o sock.o layer4.o http.o ssl.o
-LIB_OBJS = ../lib/timer.o ../lib/scheduler.o \
-          ../lib/memory.o ../lib/list.o ../lib/utils.o \
-          ../lib/html.o ../lib/signals.o
+LIB_OBJS = ../lib/timer.o ../lib/scheduler.o ../lib/memory.o ../lib/list.o \
+          ../lib/utils.o ../lib/html.o ../lib/signals.o
 
 all:   $(BIN)/$(EXEC)
        $(STRIP) $(BIN)/$(EXEC)
@@ -39,13 +39,13 @@ distclean: clean
 
 uninstall:
        rm -f $(DESTDIR)$(bindir)/$(EXEC)
-       rm -f $(DESTDIR)@mandir@/man/man1/genhash.1
+       rm -f $(DESTDIR)$(mandir)/man/man1/genhash.1
 
 install:
        install -d $(DESTDIR)$(bindir)
        install -m 755 $(BIN)/$(EXEC) $(DESTDIR)$(bindir)/
-       install -d $(DESTDIR)@mandir@/man/man1
-       install -m 644 ../doc/man/man1/genhash.1 $(DESTDIR)@mandir@/man/man1
+       install -d $(DESTDIR)$(mandir)/man/man1
+       install -m 644 ../doc/man/man1/genhash.1 $(DESTDIR)$(mandir)/man/man1
 
 mrproper: clean distclean
        rm -f config.*
index 6fd2bc5..2c7cfae 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <errno.h>
index d7c0029..a85afd6 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _HTTP_H
index e84186c..0f0df24 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "layer4.h"
index 1cb3a3c..ad4f59c 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _LAYER4_H
index 890fe5c..d295fee 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <signal.h>
index 7f825ea..496d147 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _MAIN_H
index e123f69..1643bfa 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <string.h>
index 0724209..c4f4c4d 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _SOCK_H
index 71f52ec..a2c5a57 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <openssl/err.h>
index e2b1d91..5646a29 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _SSL_H
diff --git a/goodies/arpreset.pl b/goodies/arpreset.pl
new file mode 100755 (executable)
index 0000000..b510073
--- /dev/null
@@ -0,0 +1,97 @@
+#!/usr/bin/perl -w
+
+###################################################################
+# arpreset 0.2
+# Copyright (C) 2005  Steve Milton (milton AT isomedia.com)
+#
+# Utility for deleting a single ARP entry from a cisco router.
+# Script adapted from description on Cisco tech article.
+#   http://www.cisco.com/warp/public/477/SNMP/clear_arp.shtml
+#
+# The Cisco router needs to have a read/write community setup
+# for the utility to work.  I recommend using the following
+# IOS commands to setup a restricted community that can only
+# work with the MAC table.  You will need ENABLE level access
+# to the router to execute these commands.
+#
+#    access-list 50 permit 123.123.123.123
+#    access-list 50 permit 123.123.123.124
+#    access-list 50 deny any
+#    snmp-server view arpchange ipNetToMediaEntry.4 included
+#    snmp-server community blahblah view arpchange RW 50
+#
+# Set the access-list permit to the IP addresses of the systems
+# you want to be able to make changes to the MAC table.  Set 
+# the community name (above blahblah) to something random and 
+# password-like.
+###################################################################
+# This program 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.
+# 
+# This program 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 Street, Fifth Floor, Boston, MA  
+# 02110-1301, USA.
+###################################################################
+
+use strict;
+use Getopt::Long;
+&Getopt::Long::config('auto_abbrev');
+
+my ($router,$community,$address,$help,$check);
+$router=$community=$address=$help=$check="";
+
+my $status = GetOptions("router:s" => \$router,
+                        "community:s" => \$community,
+                        "address:s" => \$address,
+                       "help" => \$help,
+                       "check" => \$check);
+
+if (($status == 0) or $help) {
+    &PrintUsage;
+    exit 1;
+}
+
+if (!$router or !$community or !$address) {
+    &PrintUsage;
+    exit 1;
+}
+
+# OID for the ARP table entries
+my $ciscoOID = ".1.3.6.1.2.1.4.22.1.4";
+my $target = "";
+
+# Walk the SNMP ARP table on the router to locate the target address
+open(GET, "/usr/bin/snmpwalk -v1 -c $community $router $ciscoOID |");
+while(<GET>) {
+    if (/^(.*?\.$address)\s/) {
+       $target = $1;
+       print $_;
+    }
+}
+close(GET);
+if ($target and !$check) {
+    print "-- changed to --\n";
+    # set the target address to "invalid"
+    system("/usr/bin/snmpset -v1 -c $community $router $target i 2");
+} elsif (!$check) {
+    print "No target OID located.";
+    exit 1;
+}
+exit;
+
+sub PrintUsage {
+    print "arpreset 0.2\nCopyright (c) 2005 by Steve Milton\narpreset comes with ABSOLUTELY NO WARRANTY\n\n";
+    print "Usage: arpreset --router=routeraddress --community=rwcommunity --address=ipaddress\n";
+    print "       arpreset --help\n";
+    print "\nWhere ipaddress is the IP address in the Cisco router that you want to invalidate\nfrom the MAC address cache.\n";
+    print "\nYou can add --check to the command to make it NOT update the router, but check for\nthe entry only.\n";
+    exit;
+}
index 457b0f8..1dbbdd6 100644 (file)
-Name: keepalived
+# $Id$
+# Authority: dag
+
+# Ugly, but we need headers from a kernel to rebuild against
+%define kernel %(rpm -q kernel-devel --qf '%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}\\n' 2>/dev/null | head -1)
+
 Summary: HA monitor built upon LVS, VRRP and services poller
-Packager: Christophe Varoqui, <christophe.varoqui@free.fr>
-Version: @VERSION@
-Release: 1
-Source: http://www.keepalived.org/software/%{name}-%{version}.tar.gz
-Copyright: GPL
+Name: keepalived
+Version: 1.1.13
+Release: 5
+License: GPL
 Group: Applications/System
-BuildRoot: /tmp/%{name}-%{version}.build
+URL: http://www.keepalived.org/
+
+Source0: http://www.keepalived.org/software/keepalived-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
-%define _exec_prefix /
+BuildRequires: openssl-devel
+# We need both of these for proper LVS support
+BuildRequires: kernel, kernel-devel
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/service, /sbin/chkconfig
+Requires(postun): /sbin/service
 
 %description
-The main goal of the keepalived project is to add a strong & robust keepalive facility to the Linux Virtual Server project. This project is written in C with multilayer TCP/IP stack checks. Keepalived implements a framework based on three family checks : Layer3, Layer4 & Layer5. This framework gives the daemon the ability of checking a LVS server pool states. When one of the server of the LVS server pool is down, keepalived informs the linux kernel via a setsockopt call to remove this server entrie from the LVS topology. In addition keepalived implements a VRRPv2 stack to handle director failover. So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks and LVS directors failover.
+The main goal of the keepalived project is to add a strong & robust keepalive
+facility to the Linux Virtual Server project. This project is written in C with
+multilayer TCP/IP stack checks. Keepalived implements a framework based on
+three family checks : Layer3, Layer4 & Layer5/7. This framework gives the
+daemon the ability to check the state of an LVS server pool. When one of the
+servers of the LVS server pool is down, keepalived informs the linux kernel via
+a setsockopt call to remove this server entry from the LVS topology. In
+addition keepalived implements an independent VRRPv2 stack to handle director
+failover. So in short keepalived is a userspace daemon for LVS cluster nodes
+healthchecks and LVS directors failover.
+
 
 %prep
-rm -rf %{buildroot}
-%setup -q
+%setup
+
 
 %build
-export CFLAGS=-D__KERNGLUE__
-# the setting of mandir should be %{buildroot}/usr/share/man, but the
-# makefile adds "man" itself.
-./configure --prefix=%{buildroot} \
-       --exec-prefix=%{buildroot} \
-       --sysconfdir=%{buildroot}/etc \
-       --with-kernel-dir=/lib/modules/$(uname -r)/build \
-       --mandir=%{buildroot}/usr/share \
-       --enable-syncd
-make
+%{?el3:export CPPFLAGS="-I/usr/kerberos/include"}
+%{?rh9:export CPPFLAGS="-I/usr/kerberos/include"}
+%configure \
+%{?el3:--includedir="/usr/kerberos/include"} \
+%{?rh9:--includedir="/usr/kerberos/include"} \
+    --with-kernel-dir="/lib/modules/%{kernel}/build"
+%{__make} %{?_smp_mflags} STRIP=/bin/true
+
 
 %install
-rm -rf %{buildroot}
-%makeinstall
-rm -rf %{buildroot}/etc/keepalived/samples
+%{__rm} -rf %{buildroot}
+%{__make} install DESTDIR=%{buildroot}
+# Remove "samples", as we include them in %%doc
+%{__rm} -rf %{buildroot}%{_sysconfdir}/keepalived/samples/
+
+%check
+# A build could silently have LVS support disabled if the kernel includes can't
+# be properly found, we need to avoid that.
+if ! grep -q "IPVS_SUPPORT='_WITH_LVS_'" config.log; then
+    echo "ERROR: We do not want keeepalived lacking LVS support."
+    exit 1
+fi
+
 
 %clean
-rm -rf %{buildroot}
+%{__rm} -rf %{buildroot}
+
 
 %post
 /sbin/chkconfig --add keepalived
 
 %preun
-/sbin/chkconfig --del keepalived
+if [ $1 -eq 0 ]; then
+    /sbin/service keepalived stop &>/dev/null || :
+    /sbin/chkconfig --del keepalived
+fi
+
+%postun
+if [ $1 -ge 1 ]; then
+    /sbin/service keepalived condrestart &>/dev/null || :
+fi
+
 
 %files
-%defattr(-,root,root)
+%defattr(-, root, root, 0755)
+%doc AUTHOR ChangeLog CONTRIBUTORS COPYING README TODO
+%doc doc/keepalived.conf.SYNOPSIS doc/samples/
+%dir %{_sysconfdir}/keepalived/
+%attr(0600, root, root) %config(noreplace) %{_sysconfdir}/keepalived/keepalived.conf
+%attr(0600, root, root) %config(noreplace) %{_sysconfdir}/sysconfig/keepalived
+%{_sysconfdir}/rc.d/init.d/keepalived
 %{_bindir}/genhash
 %{_sbindir}/keepalived
-%{_sysconfdir}/init.d/keepalived
-%dir %{_sysconfdir}/keepalived/
-%config %{_sysconfdir}/keepalived/keepalived.conf
-%doc %{_mandir}/man5/keepalived.conf.5.gz
-%doc %{_mandir}/man1/genhash.1.gz
-%doc %{_mandir}/man8/keepalived.8.gz
-%doc doc
-%doc AUTHOR CONTRIBUTORS TODO COPYING README INSTALL VERSION ChangeLog
+%{_mandir}/man1/genhash.1*
+%{_mandir}/man5/keepalived.conf.5*
+%{_mandir}/man8/keepalived.8*
+
+
+%changelog
+* Thu Sep 13 2007 Alexandre Cassen <acassen@linux-vs.org> 1.1.14
+- Merge work done by freshrpms.net... Thanks guys !!! ;)
+
+* Wed Feb 14 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-5
+- Add missing scriplet requirements.
+
+* Tue Feb 13 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-4
+- Add missing \n to the kernel define, for when multiple kernels are installed.
+- Pass STRIP=/bin/true to "make" in order to get a useful debuginfo package.
+
+* Tue Feb 13 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-3
+- Add %%check section to make sure any build without LVS support will fail.
+
+* Mon Feb  5 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-2
+- Use our own init script, include a sysconfig entry used by it for options.
+
+* Thu Jan 25 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-1
+- Update to 1.1.13.
+- Change mode of configuration file to 0600.
+- Don't include all of "doc" since it meant re-including all man pages.
+- Don't include samples in the main configuration path, they're in %%doc.
+- Include patch to add an optional label to interfaces.
+
+* Sat Apr 08 2006 Dries Verachtert <dries@ulyssis.org> - 1.1.12-1.2
+- Rebuild for Fedora Core 5.
+
+* Sun Mar 12 2006 Dag Wieers <dag@wieers.com> - 1.1.12-1
+- Updated to release 1.1.12.
+
+* Fri Mar 04 2005 Dag Wieers <dag@wieers.com> - 1.1.11-1
+- Updated to release 1.1.11.
+
+* Wed Feb 23 2005 Dag Wieers <dag@wieers.com> - 1.1.10-2
+- Fixed IPVS/LVS support. (Joe Sauer)
+
+* Tue Feb 15 2005 Dag Wieers <dag@wieers.com> - 1.1.10-1
+- Updated to release 1.1.10.
+
+* Mon Feb 07 2005 Dag Wieers <dag@wieers.com> - 1.1.9-1
+- Updated to release 1.1.9.
+
+* Sun Oct 17 2004 Dag Wieers <dag@wieers.com> - 1.1.7-2
+- Fixes to build with kernel IPVS support. (Tim Verhoeven)
+
+* Fri Sep 24 2004 Dag Wieers <dag@wieers.com> - 1.1.7-1
+- Updated to release 1.1.7. (Mathieu Lubrano)
+
+* Mon Feb 23 2004 Dag Wieers <dag@wieers.com> - 1.1.6-0
+- Updated to release 1.1.6.
+
+* Mon Jan 26 2004 Dag Wieers <dag@wieers.com> - 1.1.5-0
+- Updated to release 1.1.5.
+
+* Mon Dec 29 2003 Dag Wieers <dag@wieers.com> - 1.1.4-0
+- Updated to release 1.1.4.
+
+* Fri Jun 06 2003 Dag Wieers <dag@wieers.com> - 1.0.3-0
+- Initial package. (using DAR)
+
index 38aa4a3..2f77b43 100644 (file)
@@ -14,8 +14,10 @@ prefix      = @prefix@
 exec_prefix = @exec_prefix@
 sbindir     = @sbindir@
 sysconfdir  = @sysconfdir@
-init_script = etc/init.d/keepalived.init
-conf_file   = etc/keepalived/keepalived.conf
+mandir      = @mandir@
+init_dir    = $(sysconfdir)/rc.d/init.d
+conf_dir    = $(sysconfdir)/keepalived
+sysconf_dir = $(sysconfdir)/sysconfig
 
 CC = @CC@
 STRIP = @STRIP@
@@ -89,20 +91,23 @@ mrproper: distclean
 
 uninstall:
        rm -f $(DESTDIR)$(sbindir)/$(EXEC)
+       rm -f $(DESTDIR)$(init_dir)/keepalived.init
+       rm -f $(DESTDIR)$(sysconf_dir)/keepalived
        rm -rf $(DESTDIR)$(sysconfdir)/keepalived
-       rm -f $(DESTDIR)$(init_dir)/$(init_script)
-       rm -f $(DESTDIR)@mandir@/man/man5/keepalived.conf.5
-       rm -f $(DESTDIR)@mandir@/man/man8/keepalived.8
+       rm -f $(DESTDIR)$(mandir)/man/man5/keepalived.conf.5
+       rm -f $(DESTDIR)$(mandir)/man/man8/keepalived.8
 
 install:
        install -d $(DESTDIR)$(sbindir)
        install -m 700 $(BIN)/$(EXEC) $(DESTDIR)$(sbindir)/
-       install -d $(DESTDIR)$(sysconfdir)/init.d
-       install -m 755 $(init_script) $(DESTDIR)$(sysconfdir)/init.d/keepalived
+       install -d $(DESTDIR)$(init_dir)
+       install -m 755 etc/init.d/keepalived.init $(DESTDIR)$(init_dir)/keepalived
+       install -d $(DESTDIR)$(sysconf_dir)
+       install -m 755 etc/init.d/keepalived.sysconfig $(DESTDIR)$(sysconf_dir)/keepalived
        install -d $(DESTDIR)$(sysconfdir)/keepalived/samples
-       install -m 644 $(conf_file) $(DESTDIR)$(sysconfdir)/keepalived/
+       install -m 644 etc/keepalived/keepalived.conf $(DESTDIR)$(sysconfdir)/keepalived/
        install -m 644 ../doc/samples/* $(DESTDIR)$(sysconfdir)/keepalived/samples/
-       install -d $(DESTDIR)@mandir@/man/man5
-       install -d $(DESTDIR)@mandir@/man/man8
-       install -m 644 ../doc/man/man5/keepalived.conf.5 $(DESTDIR)@mandir@/man/man5
-       install -m 644 ../doc/man/man8/keepalived.8 $(DESTDIR)@mandir@/man/man8
+       install -d $(DESTDIR)$(mandir)/man5
+       install -d $(DESTDIR)$(mandir)/man8
+       install -m 644 ../doc/man/man5/keepalived.conf.5 $(DESTDIR)$(mandir)/man5
+       install -m 644 ../doc/man/man8/keepalived.8 $(DESTDIR)$(mandir)/man8
index d67c3c0..dc6df31 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Keepalived OpenSource project.
 #
-# Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+# Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
 
 KERNEL   = @KERN@
 CC      = @CC@
index a5d6ceb..8f2cf12 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Checkers registration.
  *
- * Version:     $Id: check_api.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_api.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <dirent.h>
index dc639b6..18be7b2 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Healthcheckrs child process handling.
  *
- * Version:     $Id: check_daemon.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_daemon.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "check_daemon.h"
index 8bfbf9d..b0649c5 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Healthcheckers dynamic data structure definition.
  *
- * Version:     $Id: check_data.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_data.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "check_data.h"
index 3595789..bbea456 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        WEB CHECK. Common HTTP/SSL checker primitives.
  *
- * Version:     $Id: check_http.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_http.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Authors:     Alexandre Cassen, <acassen@linux-vs.org>
  *              Jan Holmberg, <jan@artech.net>
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <openssl/err.h>
index c98f7ab..f936fc7 100644 (file)
@@ -6,7 +6,7 @@
  * Part:        MISC CHECK. Perform a system call to run an extra
  *              system prog or script.
  *
- * Version:     $Id: check_misc.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_misc.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Authors:     Alexandre Cassen, <acassen@linux-vs.org>
  *              Eric Jarman, <ehj38230@cmsu2.cmsu.edu>
@@ -22,7 +22,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "check_misc.h"
index 4a9dd68..57e6a58 100644 (file)
@@ -7,7 +7,7 @@
  *              data structure representation the conf file representing
  *              the loadbalanced server pool.
  *  
- * Version:     $Id: check_parser.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_parser.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -21,7 +21,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "check_parser.h"
index 1502e6a..79f7aab 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        SMTP CHECK. Check an SMTP-server.
  *
- * Version:     $Id: check_smtp.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_smtp.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Authors:     Jeremy Rumpf, <jrumpf@heavyload.net>
  *              Alexandre Cassen, <acassen@linux-vs.org>
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <ctype.h>
index b42d8bf..890d864 100644 (file)
@@ -7,7 +7,7 @@
  *              url, compute a MD5 over this result and match it to the
  *              expected value.
  *
- * Version:     $Id: check_ssl.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_ssl.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Authors:     Alexandre Cassen, <acassen@linux-vs.org>
  *              Jan Holmberg, <jan@artech.net>
@@ -22,7 +22,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <openssl/err.h>
index f4f3f58..a469311 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        TCP checker.
  *
- * Version:     $Id: check_tcp.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_tcp.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "check_tcp.h"
index 2751b59..7e27dfd 100644 (file)
@@ -7,7 +7,7 @@
  *              library to add/remove server MASQ rules to the kernel 
  *              firewall framework.
  *
- * Version:     $Id: ipfwwrapper.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: ipfwwrapper.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -21,7 +21,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "ipfwwrapper.h"
index 2109a00..8d72bcf 100644 (file)
@@ -6,7 +6,7 @@
  * Part:        IPVS Kernel wrapper. Use setsockopt call to add/remove
  *              server to/from the loadbalanced server pool.
  *  
- * Version:     $Id: ipvswrapper.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: ipvswrapper.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -20,7 +20,7 @@
  *               as published by the Free Software Foundation; either version
  *               2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "ipvswrapper.h"
index 81d5f2e..f7625c4 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Manipulation functions for IPVS & IPFW wrappers.
  *
- * Version:     $Id: ipwrapper.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: ipwrapper.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "ipwrapper.h"
index c69721a..d56efb5 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Keepalived OpenSource project.
 #
-# Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+# Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
 
 CC      = @CC@
 INCLUDES = -I../include -I../../lib
index bc0eb5c..00e85e6 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <syslog.h>
index df6518f..a8e3248 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <syslog.h>
index a05f2c5..be3449e 100644 (file)
@@ -21,7 +21,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "global_parser.h"
index 347e956..1832419 100644 (file)
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "layer4.h"
index fc5bc80..1d78b82 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "main.h"
index 4483f5d..80c0c10 100644 (file)
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "pidfile.h"
index 732707a..7fbb197 100644 (file)
@@ -21,7 +21,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <time.h>
index c070c8d..0724c4c 100755 (executable)
@@ -5,44 +5,69 @@
 # processname: keepalived
 # pidfile: /var/run/keepalived.pid
 # config: /etc/keepalived/keepalived.conf
-# chkconfig: 35 21 79
+# chkconfig: - 21 79
 # description: Start and stop Keepalived
 
-# Global definitions
-PID_FILE="/var/run/keepalived.pid"
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Source configuration file (we set KEEPALIVED_OPTIONS there)
+. /etc/sysconfig/keepalived
+
+RETVAL=0
+
+prog="keepalived"
+
+start() {
+    echo -n $"Starting $prog: "
+    daemon keepalived ${KEEPALIVED_OPTIONS}
+    RETVAL=$?
+    echo
+    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+}
+
+stop() {
+    echo -n $"Stopping $prog: "
+    killproc keepalived
+    RETVAL=$?
+    echo
+    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
+}
+
+reload() {
+    echo -n $"Reloading $prog: "
+    killproc keepalived -1
+    RETVAL=$?
+    echo
+}
 
 # See how we were called.
 case "$1" in
-  start)
-       echo -n "Starting Keepalived for LVS: "
-       keepalived -D
-       touch /var/lock/subsys/keepalived
-       echo
-       ;;
-  stop)
-       echo -n "Shutting down Keepalived for LVS: "
-       PID=`cat $PID_FILE`
-       kill $PID
-       rm -rf /var/lock/subsys/keepalived
-       echo
-       ;;
-  restart)
-       echo -n "Shutting down Keepalived for LVS: "
-       PID=`cat $PID_FILE`
-       kill $PID
-       echo
-       echo -n "Starting Keepalived for LVS: "
-       keepalived -D
-       echo
-       ;;
-  reload)
-       echo -n "Reloading Keepalived config: "
-       killall -HUP keepalived
-       echo
-       ;;
-  *)
-       echo "Usage: $0 {start|stop|restart|reload}"
-       exit 1
+    start)
+        start
+        ;;
+    stop)
+        stop
+        ;;
+    reload)
+        reload
+        ;;
+    restart)
+        stop
+        start
+        ;;
+    condrestart)
+        if [ -f /var/lock/subsys/$prog ]; then
+            stop
+            start
+        fi
+        ;;
+    status)
+        status keepalived
+        ;;
+    *)
+        echo "Usage: $0 {start|stop|reload|restart|condrestart|status}"
+        exit 1
 esac
 
-exit 0
+exit $RETVAL
diff --git a/keepalived/etc/init.d/keepalived.sysconfig b/keepalived/etc/init.d/keepalived.sysconfig
new file mode 100644 (file)
index 0000000..5da26ef
--- /dev/null
@@ -0,0 +1,15 @@
+# Options for keepalived. See `keepalived --help' output and keepalived(8) and
+# keepalived.conf(5) man pages for a list of all options. Here are the most
+# common ones :
+#
+# --vrrp               -P    Only run with VRRP subsystem.
+# --check              -C    Only run with Health-checker subsystem.
+# --dont-release-vrrp  -V    Dont remove VRRP VIPs & VROUTEs on daemon stop.
+# --dont-release-ipvs  -I    Dont remove IPVS topology on daemon stop.
+# --dump-conf          -d    Dump the configuration data.
+# --log-detail         -D    Detailed log messages.
+# --log-facility       -S    0-7 Set local syslog facility (default=LOG_DAEMON)
+#
+
+KEEPALIVED_OPTIONS="-D"
+
index 40f8bb0..43a3fbd 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Checkers arguments structures definitions.
  *
- * Version:     $Id: check_api.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_api.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _CHECK_API_H
index 8e979ec..599be66 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        check_daemon.c include file.
  * 
- * Version:     $Id: check_daemon.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_daemon.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _CHECK_DAEMON_H
index 445042d..f61b430 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Healthcheckers dynamic data structure definition.
  *
- * Version:     $Id: check_data.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_data.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _CHECK_DATA_H
index 39771f1..0279acc 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        check_http.c include file.
  *
- * Version:     $Id: check_http.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_http.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Authors:     Alexandre Cassen, <acassen@linux-vs.org>
  *              Jan Holmberg, <jan@artech.net>
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _CHECK_HTTP_H
index c3e418b..0561c25 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        check_misc.c include file.
  *
- * Version:     $Id: check_misc.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_misc.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              Eric Jarman, <ehj38230@cmsu2.cmsu.edu>
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _CHECK_MISC_H
index 1d6dc62..001c8fb 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        check_parser.c include file.
  *  
- * Version:     $Id: check_parser.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_parser.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _CHECK_PARSER_H
index de9663e..59da3ad 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        check_smtp.c include file.
  *
- * Version:     $Id: check_smtp.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_smtp.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              Jeremy Rumpf, <jrumpf@heavyload.net>
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _CHECK_SMTP_H
index 89b3a3d..389de1a 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        check_http.c include file.
  *
- * Version:     $Id: check_http.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_http.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Authors:     Alexandre Cassen, <acassen@linux-vs.org>
  *              Jan Holmberg, <jan@artech.net>
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _CHECK_SSL_H
index 877b861..fbc7fcd 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        check_tcp.c include file.
  *
- * Version:     $Id: check_tcp.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: check_tcp.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _CHECK_TCP_H
index 1730333..e6264f8 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Configuration include file.
  *
- * Version:     $Id: config.h.in,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: config.h.in,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Jacob Rief, <jacob.rief@tiscover.com>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _CONFIG_H
index 1496ef5..339da47 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Daemon process handling.
  *
- * Version:     $Id: daemon.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: daemon.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _DAEMON_H
index ab138d1..301def7 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Dynamic data structure definition.
  *
- * Version:     $Id: global_data.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: global_data.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _GLOBAL_DATA_H
index d55cc14..e90c5d9 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        vrrp_parser.c include file.
  *  
- * Version:     $Id: global_parser.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: global_parser.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _GLOBAL_PARSER_H
index c9f2dc9..e3da95d 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        ipfwwrapper.c include file.
  *
- * Version:     $Id: ipfwwrapper.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: ipfwwrapper.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _IPFWWRAPPER_H
index c7eba93..ecf8028 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        ipvswrapper.c include file.
  *
- * Version:     $Id: ipvswrapper.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: ipvswrapper.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _IPVSWRAPPER_H
index dce0cfd..75f224a 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        ipwrapper.c include file.
  *
- * Version:     $Id: ipwrapper.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: ipwrapper.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _IPWRAPPER_H
index f56d0fe..06fa0f1 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        layer4.c include file.
  *
- * Version:     $Id: layer4.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: layer4.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _LAYER4_H
index c72574b..3c29046 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Main program include file.
  *
- * Version:     $Id: main.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: main.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _MAIN_H
index a954cf5..5a9fbc3 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        pidfile.c include file.
  *
- * Version:     $Id: pidfile.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: pidfile.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _PIDFILE_H
index 6e47a60..7464dca 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        smtp.c include file.
  *
- * Version:     $Id: smtp.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: smtp.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _SMTP_H
index 794cf95..ea2b506 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Part:        vrrp.c program include file.
  *
- * Version:     $Id: vrrp.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_H
index cb919a4..ef57dc2 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_arp.c include file.
  *
- * Version:     $Id: vrrp_arp.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_arp.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_ARP_H
index 8d7d41e..d4bb117 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_daemon.c include file.
  * 
- * Version:     $Id: vrrp_daemon.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_daemon.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_DAEMON_H
index 8a1f149..f22e3f6 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Dynamic data structure definition.
  *
- * Version:     $Id: vrrp_data.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_data.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_DATA_H
index 82824ee..8c71c85 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_if.c include file.
  *
- * Version:     $Id: vrrp_if.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_if.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_IF_H
index bc9b41b..d3e159c 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_index.c include file.
  *
- * Version:     $Id: vrrp_index.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_index.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_INDEX_H
index 9a97bc1..c8a5d55 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_ipaddress.c include file.
  *
- * Version:     $Id: vrrp_ipaddress.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_ipaddress.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_IPADDR_H
@@ -45,6 +45,7 @@ typedef struct {
        int ifindex;            /* Interface index owning IP address */
        interface *ifp;         /* Interface owning IP address */
        int scope;              /* the ip address scope */
+       char *label;            /* Alias name, e.g. eth0:1 */
        int set;                /* TRUE if addr is set */
 } ip_address;
 
index b9e764f..5de93db 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_iproute.c include file.
  *
- * Version:     $Id: vrrp_iproute.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_iproute.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_IPROUTE_H
index bc69547..5d14ee7 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_ipsecah.c include file.
  * 
- * Version:     $Id: vrrp_ipsecah.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_ipsecah.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_IPSEC_AH_H
index d570ddf..77ab5d3 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_netlink.c include file.
  *
- * Version:     $Id: vrrp_netlink.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_netlink.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_NETLINK_H
index 1439778..58c72e7 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Part:        vrrp_notify.c include file.
  *
- * Version:     $Id: vrrp_notify.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_notify.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_NOTIFY_H
index 3457681..f3a748f 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        vrrp_parser.c include file.
  *  
- * Version:     $Id: vrrp_parser.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_parser.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_PARSER_H
index 0c65278..863db81 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_scheduler.c include file.
  * 
- * Version:     $Id: vrrp_scheduler.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_scheduler.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_SCHEDULER_H
index d06e573..ac04411 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_sync.c include file.
  * 
- * Version:     $Id: vrrp_sync.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_sync.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_SYNC_H
index df1607e..691d3cb 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        vrrp_track.c include file.
  *
- * Version:     $Id: vrrp_track.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_track.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VRRP_TRACK_H
index 6384c9b..f791c3e 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Keepalived OpenSource project.
 #
-# Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+# Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
 
 CC      = @CC@
 INCLUDES = -I../include -I../../lib
index 4ff51b7..8ce7336 100644 (file)
@@ -8,7 +8,7 @@
  *              master fails, a backup server takes over.
  *              The original implementation has been made by jerome etienne.
  *
- * Version:     $Id: vrrp.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -22,7 +22,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 /* local include */
index 52782fd..a64f481 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        ARP primitives.
  *
- * Version:     $Id: vrrp_arp.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_arp.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
-/* system includes */
-#include <linux/if_packet.h>
-
 /* local includes */
 #include "vrrp_arp.h"
 #include "memory.h"
 #include "utils.h"
 
+/* system includes */
+#include <linux/if_packet.h>
+
 /* global vars */
 char *garp_buffer;
 int garp_fd;
index 06ee674..b83d66a 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        VRRP child process handling.
  *
- * Version:     $Id: vrrp_daemon.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_daemon.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "vrrp_daemon.h"
index 49296a7..f0caa31 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Dynamic data structure definition.
  *
- * Version:     $Id: vrrp_data.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_data.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "vrrp_data.h"
index 2c96194..826dbf3 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Interfaces manipulation.
  *
- * Version:     $Id: vrrp_if.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_if.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 /* global include */
index 7c4cf00..7eaaf57 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        VRRP instance index table.
  *
- * Version:     $Id: vrrp_index.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_index.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 /* local include */
index e824b6c..002b4ba 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        NETLINK IPv4 address manipulation.
  *
- * Version:     $Id: vrrp_ipaddress.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_ipaddress.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 /* local include */
@@ -54,6 +54,10 @@ netlink_address_ipv4(ip_address *ipaddr, int cmd)
                addattr_l(&req.n, sizeof (req), IFA_BROADCAST,
                          &ipaddr->broadcast, sizeof (ipaddr->broadcast));
 
+       if (ipaddr->label)
+               addattr_l(&req.n, sizeof (req), IFA_LABEL,
+                         ipaddr->label, strlen(ipaddr->label) + 1);
+
        if (netlink_talk(&nl_cmd, &req.n) < 0)
                status = -1;
        return status;
@@ -90,18 +94,23 @@ netlink_iplist_ipv4(list ip_list, int cmd)
 void
 free_ipaddress(void *if_data_obj)
 {
-       FREE(if_data_obj);
+       ip_address *ip_addr = if_data_obj;
+
+       FREE_PTR(ip_addr->label);
+       FREE(ip_addr);
 }
 void
 dump_ipaddress(void *if_data_obj)
 {
        ip_address *ip_addr = if_data_obj;
-       syslog(LOG_INFO, "     %s/%d brd %s dev %s scope %s"
+       syslog(LOG_INFO, "     %s/%d brd %s dev %s scope %s%s%s"
               , inet_ntop2(ip_addr->addr)
               , ip_addr->mask
               , inet_ntop2(ip_addr->broadcast)
               , IF_NAME(if_get_by_ifindex(ip_addr->ifindex))
-              , netlink_scope_n2a(ip_addr->scope));
+              , netlink_scope_n2a(ip_addr->scope)
+              , ip_addr->label ? " label " : ""
+              , ip_addr->label ? ip_addr->label : "");
 }
 void
 alloc_ipaddress(list ip_list, vector strvec, interface *ifp)
@@ -139,6 +148,9 @@ alloc_ipaddress(list ip_list, vector strvec, interface *ifp)
                        new->scope = netlink_scope_a2n(VECTOR_SLOT(strvec, ++i));
                } else if (!strcmp(str, "broadcast") || !strcmp(str, "brd")) {
                        inet_ston(VECTOR_SLOT(strvec, ++i), &new->broadcast);
+               } else if (!strcmp(str, "label")) {
+                       new->label = MALLOC(IFNAMSIZ);
+                       strncpy(new->label, VECTOR_SLOT(strvec, ++i), IFNAMSIZ);
                } else {
                        if (inet_ston(VECTOR_SLOT(strvec, i), &ipaddr)) {
                                inet_ston(VECTOR_SLOT(strvec, i), &new->addr);
index ff5dbde..ca44cb1 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        NETLINK IPv4 routes manipulation.
  *
- * Version:     $Id: vrrp_iproute.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_iproute.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 /* local include */
index 241197d..f06a9ad 100644 (file)
@@ -7,7 +7,7 @@
  *              authentication data encryption using HMAC MD5 according to
  *              RFCs 2085 & 2104.
  *
- * Version:     $Id: vrrp_ipsecah.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_ipsecah.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -21,7 +21,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "vrrp_ipsecah.h"
index 0e1a10d..f68fdf4 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        NETLINK kernel command channel.
  *
- * Version:     $Id: vrrp_netlink.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_netlink.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 /* global include */
index 6cc3d52..404fc01 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        VRRP state transition notification scripts handling.
  *
- * Version:     $Id: vrrp_notify.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_notify.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 /* system include */
index 5bed78e..8cdd796 100644 (file)
@@ -7,7 +7,7 @@
  *              data structure representation the conf file representing
  *              the loadbalanced server pool.
  *  
- * Version:     $Id: vrrp_parser.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_parser.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -21,7 +21,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "vrrp_parser.h"
index 0e9a0ee..8c89d63 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Sheduling framework for vrrp code.
  *
- * Version:     $Id: vrrp_scheduler.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_scheduler.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "vrrp_scheduler.h"
@@ -985,6 +985,12 @@ vrrp_script_child_thread(thread * thread_obj)
        if (WIFEXITED(wait_status)) {
                int status;
                status = WEXITSTATUS(wait_status);
+               if (status == 0 && vscript->result != VRRP_SCRIPT_STATUS_GOOD) {
+                       syslog(LOG_INFO, "VRRP_Script(%s) succeeded", vscript->sname);
+               }
+               if (status != 0 && vscript->result != VRRP_SCRIPT_STATUS_NONE) {
+                       syslog(LOG_INFO, "VRRP_Script(%s) failed", vscript->sname);
+               }
                vscript->result = (status == 0) ?  VRRP_SCRIPT_STATUS_GOOD :
                                                   VRRP_SCRIPT_STATUS_NONE;
        }
index 53882cc..4efada5 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        VRRP synchronization framework.
  *
- * Version:     $Id: vrrp_sync.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_sync.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "vrrp_sync.h"
index e1c0d0f..d154902 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Interface tracking framework.
  *
- * Version:     $Id: vrrp_track.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vrrp_track.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 /* local include */
@@ -125,7 +125,7 @@ alloc_track_script(list track_list, vector strvec)
        tsc         = (tracked_sc *) MALLOC(sizeof (tracked_sc));
        tsc->scr    = vsc;
        tsc->weight = weight;
-       if (weight > 0)
+       if (weight != 0)
                vsc->inuse++;
        list_add(track_list, tsc);
 }
index dac429d..4fb2df3 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Keepalived OpenSource project.
 #
-# Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+# Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
 
 CC      = @CC@
 INCLUDES = -I.
index cde1757..0ee3040 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        HTML stream parser utility functions.
  *
- * Version:     $Id: html.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: html.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Authors:     Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <string.h>
index 8692e60..c1375b0 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        parser.c include file.
  *
- * Version:     $Id: html.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: html.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Authors:     Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _HTML_H
index 95f0ed3..90e2c95 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        List structure manipulation.
  *  
- * Version:     $Id: list.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: list.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "list.h"
index befb77c..186f4b8 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        list.c include file.
  *  
- * Version:     $Id: list.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: list.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _LIST_H
index 3a6cb19..d189d8e 100644 (file)
@@ -6,7 +6,7 @@
  * Part:        Memory management framework. This framework is used to
  *              find any memory leak.
  *
- * Version:     $Id: memory.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: memory.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Authors:     Alexandre Cassen, <acassen@linux-vs.org>
  *              Jan Holmberg, <jan@artech.net>
@@ -21,7 +21,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "memory.h"
index d49a9a7..38ecf55 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        memory.c include file.
  *
- * Version:     $Id: memory.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: memory.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Authors:     Alexandre Cassen, <acassen@linux-vs.org>
  *              Jan Holmberg, <jan@artech.net>
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _MEMORY_H
index 47d8dce..4d9bc7b 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        Forked system call to launch an extra script.
  *
- * Version:     $Id: notify.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: notify.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <unistd.h>
index 5d9fd0f..10893e8 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        notify.c include file.
  *
- * Version:     $Id: notify.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: notify.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _NOTIFY_H
index dbec8f4..ae5d757 100644 (file)
@@ -7,7 +7,7 @@
  *              data structure representation the conf file representing
  *              the loadbalanced server pool.
  *  
- * Version:     $Id: parser.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: parser.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
+#include <glob.h>
+#include <unistd.h>
+#include <libgen.h>
+#include <errno.h>
 #include "parser.h"
 #include "memory.h"
 
 /* global vars */
 vector keywords;
-FILE *stream;
+FILE *current_stream;
+char *current_conf_file;
 int reload = 0;
 
 /* local vars */
@@ -181,20 +186,94 @@ alloc_strvec(char *string)
        }
 }
 
+void read_conf_file(char *conf_file)
+{
+       FILE *stream;
+
+       glob_t globbuf;
+
+       globbuf.gl_offs = 0;
+       glob(conf_file, 0, NULL, &globbuf);
+
+       int i;
+       for(i = 0; i < globbuf.gl_pathc; i++){
+               syslog(LOG_INFO, "Opening file '%s'.\n",globbuf.gl_pathv[i]);
+               stream = fopen(globbuf.gl_pathv[i], "r");
+               if (!stream) {
+                       syslog(LOG_INFO, "Configuration file '%s' open problem (%s)...\n"
+                                      , globbuf.gl_pathv[i], strerror(errno));
+                       return;
+               }
+               current_stream = stream;
+               current_conf_file = globbuf.gl_pathv[i];
+               
+               char prev_path[MAXBUF];
+               getcwd(prev_path, MAXBUF);
+
+               char *confpath = strdup(globbuf.gl_pathv[i]);
+               dirname(confpath);
+               chdir(confpath);
+               process_stream(keywords);
+               fclose(stream);
+
+               chdir(prev_path);
+       }
+
+       globfree(&globbuf);
+}
+
+int
+check_include(char *buf)
+{
+       char *str;
+       vector strvec;
+
+       strvec = alloc_strvec(buf);
+
+       if (!strvec){
+               return 0;
+       }
+       str = VECTOR_SLOT(strvec, 0);
+       
+       if (!strcmp(str, EOB)) {
+               free_strvec(strvec);
+               return 0;
+       }
+
+       if(!strcmp("include", str) && VECTOR_SIZE(strvec) == 2){
+               char *conf_file = VECTOR_SLOT(strvec, 1);
+
+               FILE *prev_stream = current_stream;
+               char *prev_conf_file = current_conf_file;
+               char prev_path[MAXBUF];
+               getcwd(prev_path, MAXBUF);
+               read_conf_file(conf_file);
+               current_stream = prev_stream;
+               current_conf_file = prev_conf_file;
+               chdir(prev_path);
+               return 1;
+       }
+       free_strvec(strvec);
+       return 0;
+}
+
 int
 read_line(char *buf, int size)
 {
        int ch;
-       int count = 0;
 
-       while ((ch = fgetc(stream)) != EOF && (int) ch != '\n'
-              && (int) ch != '\r') {
-               if (count < size)
-                       buf[count] = (int) ch;
-               else
-                       break;
-               count++;
-       }
+       do {
+               int count = 0;
+               memset(buf, 0, MAXBUF);
+               while ((ch = fgetc(current_stream)) != EOF && (int) ch != '\n'
+                          && (int) ch != '\r') {
+                       if (count < size)
+                               buf[count] = (int) ch;
+                       else
+                               break;
+                       count++;
+               }
+       } while (check_include(buf) == 1);
        return (ch == EOF) ? 0 : 1;
 }
 
@@ -352,23 +431,17 @@ process_stream(vector keywords_vec)
 void
 init_data(char *conf_file, vector (*init_keywords) (void))
 {
-       stream = fopen((conf_file) ? conf_file : CONF, "r");
-       if (!stream) {
-               syslog(LOG_INFO, "Configuration file open problem...\n");
-               return;
-       }
-
        /* Init Keywords structure */
        keywords = vector_alloc();
        (*init_keywords) ();
 
-/* Dump configuration *
-vector_dump(keywords);
-dump_keywords(keywords, 0);
-*/
+#if 0
+       /* Dump configuration */
+       vector_dump(keywords);
+       dump_keywords(keywords, 0);
+#endif
 
        /* Stream handling */
-       process_stream(keywords);
-       fclose(stream);
+       read_conf_file((conf_file) ? conf_file : CONF);
        free_keywords(keywords);
 }
index a649ee2..732c0c6 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        cfreader.c include file.
  *  
- * Version:     $Id: parser.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: parser.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _PARSER_H
@@ -55,7 +55,7 @@ struct keyword {
 
 /* global vars exported */
 extern vector keywords;
-extern FILE *stream;
+extern FILE *current_stream;
 extern int reload;
 
 /* Prototypes */
index 777dead..ed7a245 100644 (file)
@@ -7,7 +7,7 @@
  *              the thread management routine (thread.c) present in the 
  *              very nice zebra project (http://www.zebra.org).
  *
- * Version:     $Id: scheduler.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: scheduler.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -21,7 +21,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <signal.h>
index d68e2bd..64b67ef 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        scheduler.c include file.
  *
- * Version:     $Id: scheduler.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: scheduler.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _SCHEDULER_H
index 7229302..c31d16f 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        Signals framework.
  *  
- * Version:     $Id: signals.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: signals.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Kevin Lindsay, <kevinl@netnation.com>
  *              Alexandre Cassen, <acassen@linux-vs.org>
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <signal.h>
index 5c7356e..f74ae73 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        signals.c include file.
  *  
- * Version:     $Id: signals.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: signals.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Kevin Lindsay, <kevinl@netnation.com>
  *              Alexandre Cassen, <acassen@linux-vs.org>
@@ -20,7 +20,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _SIGNALS_H
index aea2cda..1940008 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        Timer manipulations.
  *  
- * Version:     $Id: timer.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: timer.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include <stdio.h>
index 1a94004..f744567 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        timer.c include file.
  *  
- * Version:     $Id: timer.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: timer.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _TIMER_H
index 1190fe9..5e39975 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        General program utils.
  *
- * Version:     $Id: utils.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: utils.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "utils.h"
index 5da5c43..8c826b5 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Part:        utils.h include file.
  *
- * Version:     $Id: utils.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: utils.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _UTILS_H
index 2d8c4b8..1a7ad3a 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        Vector structure manipulation.
  *  
- * Version:     $Id: vector.c,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vector.c,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  * 
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *              
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #include "vector.h"
index 17d5daa..69b7bb1 100644 (file)
@@ -5,7 +5,7 @@
  * 
  * Part:        vector.c include file.
  *  
- * Version:     $Id: vector.h,v 1.1.13 2006/10/11 05:22:13 acassen Exp $
+ * Version:     $Id: vector.h,v 1.1.14 2007/09/13 21:12:33 acassen Exp $
  *
  * Author:      Alexandre Cassen, <acassen@linux-vs.org>
  *
@@ -19,7 +19,7 @@
  *              as published by the Free Software Foundation; either version
  *              2 of the License, or (at your option) any later version.
  *
- * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
+ * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
  */
 
 #ifndef _VECTOR_H