Fix template issue in IPv6 host header.
unify logging of RS and VS

This fixes the bug of displaying a FWM service as [x.x.x.x]:0,
where x.x.x.x is the first RS of that service
unify connection options among checkers

All the remote checkers (TCP, HTTP/SSL, SMTP) now have the same set of connection options:
 * connect_ip (new to TCP, HTTP)
 * connect_port
 * bindto
 * bind_port  (new)
 * connect_timeout (new to SMTP)

All of them are optional with reasonable defaults.
The patch is designed for simplicity in adding a new option.

Since the connect_ip could be inequal to the RS address and, worse, the same for all RSes,
the endpoint is now logged as [RS]:rport, not the [connect_ip]:connect_port.
fwmark connection option
make SO_MARK a compile-time option
documentation for generic connection opts
random delay before doing the first check

every RS check is registered with a random delay
between 0 and vs->delay_loop seconds. It helps
avoiding multiple simultaneous checks to the same RS server.
Revert "Honor preempt_delay setting on startup."

This reverts commit c7a985db4136b374dbee25caa39aa121bc16fb7d, and
fixes #80.

This commit resulted in two individual bugs:

1) A keepalived instance coming on-line would not transition to MASTER
state until the preempt_delay duration had passed, even though there was
no already existing VRRP speaker in MASTER state on the link. In other
words, it changed the semantics of preempt_delay from a delay that only
took place before *preemption* of another VRRP speaker, to a delay that
unconditionally took place after Keepalived came online. The
keepalived.conf manual page has always documented the former meaning,
which is also IMHO the only one that you would intuitively expect.

2) The preempt_delay was applied when a Keepalived process was reloading
its configuration following the recipt of SIGHUP. If the Keepalived
instance was in MASTER state before the reload, it would cease
transmitting VRRP hellos for the duration of preempt_delay, but *not*
actually remove the virtual addresses from the network interfaces. This
in turn resulted in any backup VRRP speakers on the links transition to
the MASTER state while preempt_delay was still in effect on the original
MASTER that was reloaded, thus creating a service-impacting split-brain
scenario where the virtual addresses are present and active on multiple
VRRP speakers simultaneously.

If the functionality that c7a985d aimed to implement really is needed in
Keepalived, it should instead be implemented using a separate
configuration setting independent from preempt_delay. An appropriate
name for this new setting could be for example "startup_delay" or
"initial_delay". However, it could also be implemented in the init
script, by starting keepalived with e.g. "sleep N && keepalived" where N
would be the desired duration of the initial/startup delay.
Merge pull request #82 from toreanderson/fix-preempt_delay

Revert "Honor preempt_delay setting on startup."
vrrp: Proper restore of VMAC interface properties on SIGHUP

On SIGHUP the VMAC flag and base ifindex for a VMAC interface was lost.

Signed-off-by: Jonas Johansson <jonasj76@gmail.com>
Merge pull request #84 from jonasj76/vmac-sighup

Proper restore of VMAC interface properties on SIGHUP
vrrp: Let only base interface change the VMAC interface status flags

The interface status flags for a VMAC interface shall only be changed by the
base interface, never by reading the actual VMAC interface flags.

Signed-off-by: Jonas Johansson <jonasj76@gmail.com>
Merge pull request #85 from jonasj76/vmac-startup

vrrp: Let only base interface change the VMAC interface status flags
Merge branch 'master' into to_acassen

Conflicts:
	keepalived/check/ipwrapper.c
Merge pull request #83 from andriyanov/to_acassen

Great Work ! Thanks Alexey !
clarify the type of 'warmup' struct member

Initially the warmup field of the checker struct contained number of seconds
and was typed as unsigned int. Then it was changed to store timer ticks, but
the type was not changed to long as for other variables storing timer ticks.

This commit fixes this minor arch-specific issue.
Merge pull request #87 from andriyanov/fix_warmup_type

clarify the type of 'warmup' struct member
Merge pull request #75 from jhaprins/master

Fix template issue in IPv6 host header.
vrrp: fix ip_address comparison

Extend IP_ISEQ() macro to take care of NULL addresses. This issue end on
SEGV while using virtual_route. thanks to Tore Anderson for reporting.
Merge branch 'master' of github.com:acassen/keepalived