Add option to prevent respawn of child processes.

This patch adds a command-line option (--dont-respawn, -R) that will
prevent the child processes from respawning. When this option is
specified, if either the checker or vrrp child processes exit the
parent process will raise the SIGTERM signal and exit.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Remove duplicate command-line option code

This patch removes unnecessary code to process command-line
options. All options can be processed with a single while loop that
calls poptGetNextOpt. This patch also adds code to check for errors
while processing options. Note that errors encountered while
processing command-line options are fatal.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Use popt to generate usage

This patch uses the popt library to describe the command-line options
and print usage to stderr. This provides a more clear, concise usage
statement.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Update keepalived man page

The keepalived(8) was out-of-date and, in some cases, inaccurate. This
patch provides a complete rewrite of the keepalived(8) man page. This
includes updated synopsis, description, and options.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Add flexible HTTP checker behaviour for HTTP GET request's port settings.

VirtualServer's port being specified in HTTP GET request
only if `VirtualHost` option is not defined,
otherwise used `VirtualHost` option itself.
Fix pointer arithmetic for VRRP packet

When using IPSEC AH authentication, the pointer arithmetic used to get
the location of the VRRP packet is incorrect. The address of the IPSEC
header must be cast as (char *) in order to get correct address of the
VRRP packet. Without this patch, vrrp_in_chk() will fail to verify
incoming VRRP packets when IPSEC AH is enabled.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Load SSL certificate correctly.

This patch fixes a problem where keepalived will attempt to load an
SSL keyfile as a certificate, resulting in failure to initialize SSL
context.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Fix typo in error messages.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Update GPLv2 license.

This GPLv2 license found in COPYING had a couple errors, including an
incorrect address for the Free Software Foundation. This patch updates
the GPLv2 license to match the license that can be found at:
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Fix configure.in. Library crypt is needed.
Fix comparison of primary IP addresses.

If a router in the master state receives an advertisement with
priority equal to the local priority, it must also compare the primary
IP addresses (RFC 3768, section 6.4.3). The code to handle this was
comparing two IP addresses with different byte-ordering, resulting in
multiple routers in the master state. This patches resolves the
problem by coverting the local primary IP address to network byte
order for the comparison.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Remove log_message calls from if_get_by_ifname.

The if_get_by_ifname function would log a message if either the
if_queue list was empty or if the interface name was not present in
the list. Since if_get_by_ifname is called to check for the existence
of an interface before adding it to the list, the "No such interface"
message is logged whenever adding a new interface to this list. This
is normal but can be confusing. Since if_get_by_ifname returns NULL
when the interface does not exist, the caller should be responsible
for logging any error messages.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Fix a memory leak
Fix a memory leak
set RETVAL for status instead keeping RETVAL set to default of 0
set RETVAL for catch all and so that it exits like all other matches in the case
check: handle notifications in sighup

sighup handler now respects quorum_up, quorum_down,
notify_up, notify_down, alpha, omega, quorum, hysteresis
configuration directives
VS_ISEQ: compare quorum_up handler values

This ensures that if quorum_up action has been changed,
it will be instantly called even if service is already UP.
In this case the service will be completely removed and applied
again as a new one.
status_code and digest may be set together

This fix is dealing with that is impossible to configure HTTP/SSL
check which needs both status_code and digest to success.
Now, if both these parameters are specified for particular check,
it is considered successive only if both match.
corrected a typo