keepalived-1.2.4
Fix typo in dump_vscript.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Merge SNMP support from Vincent Bernat !

Thanks Vincent for this great job. I merged all patchset from
Vincent in one huge commit since I made changes in code last time which
broke most of patches. Merged patches are :

* SNMP is not compiled nor activated by default.
* Updated autoconf script
* Created Keepalived MIB
* Integration of NetSNMP into main scheduling loop
* vrrp: Most internal data can be queried with SNMP.
* check: Most internal values can be queried using SNMP.
  The main exception is the ability to query checkers
  which is not present.
* check: SNMP support for IPVS stats. IPVS stats are
  exported with SNMP. A cache is used to avoid to query
  the kernel too much.
* Created core framework for SNMP trap
* vrrp: SNMP traps are sent when instance state changes
  and when sync group state changes
* check: SNMP traprs are sent when real server state changes
  and when virtual server quorum state changes
* vrrp: add support to write/update operations from SNMP.
  Write/update support is available for changing the base priority
  and for changing instance preemption.
* check: add support to write/update operations from SNMP.
  Write support is available for changing the weight of a real
  server.
* workaround for AgentX ping blocking Keepalived. When establishing
  AgentX session with the master agent, we setup low timeout and
  retries values. If the master agent is blocked, we will wait for
  less than 1 second for them and therefore, there will be no
  disruption for VRRP.
Merge pull request #3 from rohara/d60d3b79167b3edc0bf3a18b65984f443c38fe00

Fix typo in dump_script.
Copyright update
keepalived-1.2.5
Rename global config data variable 'global_data'.

This patch renames the global configuration data variable from 'data'
to 'global_data'. Three reasons for renaming this varibale:

	- Fixes shadow declaration of 'data' in several locations.
	- Is more consistent with other global data variables
	  (ie. vrrp_data, check_data).
	- Functions like free_global_data and dump_global_data were
	  ignoring conf_data_t argument and using global variable instead.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Fix shadow declaration of 'vrrp_data' variable.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Fix shadow declaration of 'check_data' variable.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Remove shadow declaration of 'element e' in vrrp_init_state.

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Merge pull request #4 from rohara/devel

Fix shadow variables.
Avoid the use of kernel defines in libipvs userland prototypes

* fix libipvs-2.4 ipvs_get_service(...) prototype to use
  ISO types instead of kernel ones...
* fix libipvs-2.6 ipvs_get_service(...) prototype to use
  ISO types instead of kernel ones...
libipvs-2.4 fix

Oops, just forgot this commit... here it is.
Correctly handle macvlan interface when config file is re-loaded.

Testing with the 1.2.0 branch, bring keepalived up with a vrrp_instance
that is configured with use_vmac.  Then delete that vrrp_instance from
the config file.  Then tell keepalived to re-read its config file with
SIGHUP.  The vrrp_instance will be stopped, but the macvlan interface
will remain.

The obvious fix would be to add code to call netlink_link_del_vmac() in
clear_diff_vrrp().  There's one problem with that: the code needs the
ifindex of the macvlan interface to delete it, but that resides in the
interface structure that was freed earlier in the reload process.  My
fix is to add a field to the vrrp_rt struct to remember the macvlan ifindex.

This patch addresses this problem plus two others that can occur in
reloading the config file:  1) If the vrrp_instance configuration is
kept, but the use_vmac entry is removed, the macvlan interface will not
be deleted; 2) If a vrrp_instance with use_vmac is left unchanged, the
code will attempt to re-create the macvlan interface, but this will fail
and the program will end up not using the macvlan interface.
VRRP should notify other routers before it does any action that effects traffic flow

   * Move the shutdown_vrrp_instances code to before the deletion of sock_pool
   * Move sending priority 0 adverts to before address removal occurs
Stop timers before shutting down vrrp instances. This is to avoid a possible condition where a priority 0 advertisement is sent and before the master thread is killed another advertisement can be generated and sent.
Bugfix 8238: Change when socket fd's are freed.

  Priority 0 advertisements were not being sent as desired on config
  reload. This was causing long delays on manually failed over
  instances.

  The socket pool was being freed too early, as a result the file
  descriptor for the socket was no longer valid at the time the priority
  0 advertisment was attempted.
Fix compiler warnings
Ignore automatically generated files in git
Merge pull request #5 from jsouthworth/master

Vyatta Changes