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>
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 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 macro in keepalived.conf.5 man page.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Add To header for SMTP alerts.

Signed-off-by: Pasi Kärkkäinen <pasik@iki.fi>
Merge pull request #15 from rohara/devel

Merging playground open :) Merge pending patches. Thanks for backlogging this for me guys !