Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
ha
>
keepalived
> keepalived-1.1.20-fixes.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File keepalived-1.1.20-fixes.patch of Package keepalived (Revision 1)
Currently displaying revision
1
,
show latest
diff -uNr keepalived-1.1.20/doc/man/man5/keepalived.conf.5 keepalived-fixes/doc/man/man5/keepalived.conf.5 --- keepalived-1.1.20/doc/man/man5/keepalived.conf.5 2009-09-28 12:56:54.000000000 +0200 +++ keepalived-fixes/doc/man/man5/keepalived.conf.5 2010-11-12 17:16:39.000000000 +0100 @@ -45,45 +45,24 @@ .SH Static routes/addresses .PP -keepalived can configure static addresses and routes -with -.I ip -(ie if addresses are not already on the machine). These addresses are +keepalived can configure static addresses and routes. These addresses are .B NOT moved by vrrpd, they stay on the machine. If you already have IPs and routes on your machines and your machines can ping each other, you don't need this section. .PP -The whole string is fed to -.I ip addr add. -You can truncate the string anywhere you like and let -.I ip addr add -use defaults for the rest of the string. If you just -feed the string "192.168.1.1", the IP will be 192.168.1.1/32, -which you probably don't want. -This is different to -.I ifconfig -which will configure the IP with the standard class, here -192.168.1.1/24. -The minimum string then would be the IP/netmask, eg 192.168.1.1/24 +The syntax is the same as for virtual addresses and virtual routes. .PP static_ipaddress { - 192.168.1.1/24 brd + dev eth0 scope global + 192.168.1.1/24 dev eth0 scope global ... } .PP -The whole string is fed to -.I ip route add. -You can truncate the string allowing -.I ip route add -to use defaults. -.PP static_routes { - src $SRC_IP to $DST_IP dev $SRC_DEVICE + 192.168.2.0/24 via 192.168.1.100 dev eth0 ... - src $SRC_IP to $DST_IP via $GW dev $SRC_DEVICE } .PP .SH VRRPD CONFIGURATION @@ -218,11 +197,13 @@ } # routes add|del when changing to MASTER, to BACKUP virtual_routes { - # src <IPADDR> [to] <IPADDR>/<MASK> via|gw <IPADDR> dev <STRING> scope <SCOPE> tab + # src <IPADDR> [to] <IPADDR>/<MASK> via|gw <IPADDR> [or <IPADDR>] dev <STRING> scope <SCOPE> tab src 192.168.100.1 to 192.168.109.0/24 via 192.168.200.254 dev eth1 192.168.110.0/24 via 192.168.200.254 dev eth1 192.168.111.0/24 dev eth2 192.168.112.0/24 via 192.168.100.254 + 192.168.113.0/24 via 192.168.200.254 or 192.168.100.254 dev eth1 + blackhole 192.168.114.0/24 } # VRRP will normally preempt a lower priority diff -uNr keepalived-1.1.20/goodies/arpreset.pl keepalived-fixes/goodies/arpreset.pl --- keepalived-1.1.20/goodies/arpreset.pl 1970-01-01 01:00:00.000000000 +0100 +++ keepalived-fixes/goodies/arpreset.pl 2010-11-12 17:16:39.000000000 +0100 @@ -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; +} diff -uNr keepalived-1.1.20/.indent.pro keepalived-fixes/.indent.pro --- keepalived-1.1.20/.indent.pro 1970-01-01 01:00:00.000000000 +0100 +++ keepalived-fixes/.indent.pro 2010-11-12 17:16:39.000000000 +0100 @@ -0,0 +1,8 @@ +-kr +-i8 +-ts8 +-sob +-l80 +-ss +-bs +-psl diff -uNr keepalived-1.1.20/keepalived/check/check_daemon.c keepalived-fixes/keepalived/check/check_daemon.c --- keepalived-1.1.20/keepalived/check/check_daemon.c 2010-05-06 17:48:15.000000000 +0200 +++ keepalived-fixes/keepalived/check/check_daemon.c 2010-11-12 17:16:39.000000000 +0100 @@ -217,7 +217,7 @@ } /* We catch a SIGCHLD, handle it */ - log_message(LOG_INFO, "Healthcheck child process(%d) died: Respawning", pid); + log_message(LOG_ALERT, "Healthcheck child process(%d) died: Respawning", pid); start_check_child(); return 0; } diff -uNr keepalived-1.1.20/keepalived/check/check_data.c keepalived-fixes/keepalived/check/check_data.c --- keepalived-1.1.20/keepalived/check/check_data.c 2010-05-06 17:48:22.000000000 +0200 +++ keepalived-fixes/keepalived/check/check_data.c 2010-11-12 17:16:39.000000000 +0100 @@ -261,6 +261,7 @@ vs->s_svr = (real_server *) MALLOC(sizeof (real_server)); vs->s_svr->weight = 1; + vs->s_svr->iweight = 1; inet_ston(ip, &vs->s_svr->addr_ip); vs->s_svr->addr_port = htons(atoi(port)); } @@ -310,6 +311,7 @@ inet_ston(ip, &new->addr_ip); new->addr_port = htons(atoi(port)); new->weight = 1; + new->iweight = 1; new->failed_checkers = alloc_list(free_failed_checkers, NULL); if (LIST_ISEMPTY(vs->rs)) diff -uNr keepalived-1.1.20/keepalived/check/check_parser.c keepalived-fixes/keepalived/check/check_parser.c --- keepalived-1.1.20/keepalived/check/check_parser.c 2010-05-06 17:48:39.000000000 +0200 +++ keepalived-fixes/keepalived/check/check_parser.c 2010-11-12 17:16:39.000000000 +0100 @@ -171,6 +171,7 @@ virtual_server *vs = LIST_TAIL_DATA(check_data->vs); real_server *rs = LIST_TAIL_DATA(vs->rs); rs->weight = atoi(VECTOR_SLOT(strvec, 1)); + rs->iweight = rs->weight; } #ifdef _KRNL_2_6_ static void diff -uNr keepalived-1.1.20/keepalived/check/ipwrapper.c keepalived-fixes/keepalived/check/ipwrapper.c --- keepalived-1.1.20/keepalived/check/ipwrapper.c 2010-05-06 17:49:18.000000000 +0200 +++ keepalived-fixes/keepalived/check/ipwrapper.c 2010-11-12 17:16:39.000000000 +0100 @@ -228,8 +228,6 @@ rs = ELEMENT_DATA(e); if (!ISALIVE(rs)) /* We only handle alive servers */ continue; - if (!(add ^ rs->set)) /* Already done */ - continue; if (add) rs->alive = 0; ipvs_cmd(add?LVS_CMD_ADD_DEST:LVS_CMD_DEL_DEST, check_data->vs_group, vs, rs); @@ -237,6 +235,89 @@ } } +/* set quorum state depending on current weight of real servers */ +void +update_quorum_state(virtual_server * vs) +{ + char rsip[16], vsip[16]; + + /* If we have just gained quorum, it's time to consider notify_up. */ + if (vs->quorum_state == DOWN + && weigh_live_realservers(vs) >= vs->quorum + vs->hysteresis) { + vs->quorum_state = UP; + log_message(LOG_INFO, "Gained quorum %lu+%lu=%lu <= %u for VS [%s:%d]" + , vs->quorum + , vs->hysteresis + , vs->quorum + vs->hysteresis + , weigh_live_realservers(vs) + , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) + , ntohs(SVR_PORT(vs))); + if (vs->s_svr && ISALIVE(vs->s_svr)) { + log_message(LOG_INFO, + "Removing sorry server [%s:%d] from VS [%s:%d]", + inet_ntoa2(SVR_IP(vs->s_svr), rsip) + , ntohs(SVR_PORT(vs->s_svr)) + , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) + , ntohs(SVR_PORT(vs))); + + ipvs_cmd(LVS_CMD_DEL_DEST + , check_data->vs_group + , vs + , vs->s_svr); + vs->s_svr->alive = 0; + + /* Adding back alive real servers */ + perform_quorum_state(vs, 1); + } + if (vs->quorum_up) { + log_message(LOG_INFO, "Executing [%s] for VS [%s:%d]" + , vs->quorum_up + , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) + , ntohs(SVR_PORT(vs))); + notify_exec(vs->quorum_up); + } + return; + } + + /* If we have just lost quorum for the VS, we need to consider + * VS notify_down and sorry_server cases + */ + if (vs->quorum_state == UP + && weigh_live_realservers(vs) < vs->quorum - vs->hysteresis) { + vs->quorum_state = DOWN; + log_message(LOG_INFO, "Lost quorum %lu-%lu=%lu > %u for VS [%s:%d]" + , vs->quorum + , vs->hysteresis + , vs->quorum - vs->hysteresis + , weigh_live_realservers(vs) + , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) + , ntohs(SVR_PORT(vs))); + if (vs->quorum_down) { + log_message(LOG_INFO, "Executing [%s] for VS [%s:%d]" + , vs->quorum_down + , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) + , ntohs(SVR_PORT(vs))); + notify_exec(vs->quorum_down); + } + if (vs->s_svr) { + log_message(LOG_INFO, + "Adding sorry server [%s:%d] to VS [%s:%d]", + inet_ntoa2(SVR_IP(vs->s_svr), rsip) + , ntohs(SVR_PORT(vs->s_svr)) + , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) + , ntohs(SVR_PORT(vs))); + + /* the sorry server is now up in the pool, we flag it alive */ + ipvs_cmd(LVS_CMD_ADD_DEST, check_data->vs_group, vs, vs->s_svr); + vs->s_svr->alive = 1; + + /* Remove remaining alive real servers */ + perform_quorum_state(vs, 0); + } + return; + } +} + /* manipulate add/remove rs according to alive state */ void perform_svr_state(int alive, virtual_server * vs, real_server * rs) @@ -252,29 +333,6 @@ if (!ISALIVE(rs) && alive) { - /* adding a server to the vs pool, if sorry server is flagged alive, - * we remove it from the vs pool. - */ - if (vs->s_svr) { - if (ISALIVE(vs->s_svr) && - (vs->quorum_state == UP || - (weigh_live_realservers(vs) + rs->weight >= - vs->quorum + vs->hysteresis))) { - log_message(LOG_INFO, - "Removing sorry server [%s:%d] from VS [%s:%d]", - inet_ntoa2(SVR_IP(vs->s_svr), rsip) - , ntohs(SVR_PORT(vs->s_svr)) - , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) - , ntohs(SVR_PORT(vs))); - - ipvs_cmd(LVS_CMD_DEL_DEST - , check_data->vs_group - , vs - , vs->s_svr); - vs->s_svr->alive = 0; - } - } - log_message(LOG_INFO, "%s service [%s:%d] to VS [%s:%d]", (rs->inhibit) ? "Enabling" : "Adding" , inet_ntoa2(SVR_IP(rs), rsip) @@ -296,29 +354,9 @@ , ntohs(SVR_PORT(vs))); notify_exec(rs->notify_up); } - /* If we have just gained quorum, it's time to consider notify_up. */ - if (vs->quorum_state == DOWN - && weigh_live_realservers(vs) >= vs->quorum + vs->hysteresis) { - vs->quorum_state = UP; - log_message(LOG_INFO, "Gained quorum %lu+%lu=%lu <= %u for VS [%s:%d]" - , vs->quorum - , vs->hysteresis - , vs->quorum + vs->hysteresis - , weigh_live_realservers(vs) - , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) - , ntohs(SVR_PORT(vs))); - if (vs->s_svr) - /* Adding back alive real servers */ - perform_quorum_state(vs, 1); - if (vs->quorum_up) { - log_message(LOG_INFO, "Executing [%s] for VS [%s:%d]" - , vs->quorum_up - , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) - , ntohs(SVR_PORT(vs))); - notify_exec(vs->quorum_up); - } - } - return; + + /* We may have gained quorum */ + update_quorum_state(vs); } if (ISALIVE(rs) && !alive) { @@ -347,42 +385,8 @@ notify_exec(rs->notify_down); } - /* If we have just lost quorum for the VS, we need to consider - * VS notify_down and sorry_server cases - */ - if (vs->quorum_state == UP - && weigh_live_realservers(vs) < vs->quorum - vs->hysteresis) { - vs->quorum_state = DOWN; - log_message(LOG_INFO, "Lost quorum %lu-%lu=%lu > %u for VS [%s:%d]" - , vs->quorum - , vs->hysteresis - , vs->quorum - vs->hysteresis - , weigh_live_realservers(vs) - , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) - , ntohs(SVR_PORT(vs))); - if (vs->quorum_down) { - log_message(LOG_INFO, "Executing [%s] for VS [%s:%d]" - , vs->quorum_down - , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) - , ntohs(SVR_PORT(vs))); - notify_exec(vs->quorum_down); - } - if (vs->s_svr) { - log_message(LOG_INFO, - "Adding sorry server [%s:%d] to VS [%s:%d]", - inet_ntoa2(SVR_IP(vs->s_svr), rsip) - , ntohs(SVR_PORT(vs->s_svr)) - , (vs->vsgname) ? vs->vsgname : inet_ntoa2(SVR_IP(vs), vsip) - , ntohs(SVR_PORT(vs))); - - /* the sorry server is now up in the pool, we flag it alive */ - ipvs_cmd(LVS_CMD_ADD_DEST, check_data->vs_group, vs, vs->s_svr); - vs->s_svr->alive = 1; - - /* Remove remaining alive real servers */ - perform_quorum_state(vs, 0); - } - } + /* We may have lost quorum */ + update_quorum_state(vs); } } @@ -404,11 +408,15 @@ , ntohs(SVR_PORT(vs))); rs->weight = weight; /* - * Have weight change take effect now only if rs is alive. - * If not, it will take effect later when it becomes alive. + * Have weight change take effect now only if rs is in + * the pool and alive and the quorum is met (or if + * there is no sorry server). If not, it will take + * effect later when it becomes alive. */ - if (ISALIVE(rs)) + if (rs->set && ISALIVE(rs) && + (vs->quorum_state == UP || !vs->s_svr || !ISALIVE(vs->s_svr))) ipvs_cmd(LVS_CMD_EDIT_DEST, check_data->vs_group, vs, rs); + update_quorum_state(vs); } } @@ -599,6 +607,7 @@ */ rs->alive = old_rs->alive; rs->set = old_rs->set; + rs->weight = old_rs->weight; return 1; } } @@ -651,7 +660,7 @@ log_message(LOG_INFO, "Removing service [%s:%d] from VS [%s:%d]" , inet_ntoa2(SVR_IP(rs), rsip) , ntohs(SVR_PORT(rs)) - , inet_ntoa2(SVR_IP(old_vs), vsip) + , (old_vs->vsgname) ? old_vs->vsgname : inet_ntoa2(SVR_IP(old_vs), vsip) , ntohs(SVR_PORT(old_vs))); rs->inhibit = 0; if (!ipvs_cmd(LVS_CMD_DEL_DEST, check_data->vs_group, old_vs, rs)) diff -uNr keepalived-1.1.20/keepalived/core/main.c keepalived-fixes/keepalived/core/main.c --- keepalived-1.1.20/keepalived/core/main.c 2010-05-06 17:49:55.000000000 +0200 +++ keepalived-fixes/keepalived/core/main.c 2010-11-12 17:16:39.000000000 +0100 @@ -87,9 +87,6 @@ void sighup(void *v, int sig) { - /* Set the reloading flag */ - SET_RELOAD; - /* Signal child process */ if (vrrp_child > 0) kill(vrrp_child, SIGHUP); diff -uNr keepalived-1.1.20/keepalived/include/check_data.h keepalived-fixes/keepalived/include/check_data.h --- keepalived-1.1.20/keepalived/include/check_data.h 2010-05-06 17:50:22.000000000 +0200 +++ keepalived-fixes/keepalived/include/check_data.h 2010-11-12 17:16:39.000000000 +0100 @@ -68,6 +68,7 @@ uint32_t addr_ip; uint16_t addr_port; int weight; + int iweight; /* Initial weight */ #ifdef _KRNL_2_6_ uint32_t u_threshold; /* Upper connection limit. */ uint32_t l_threshold; /* Lower connection limit. */ @@ -160,7 +161,7 @@ #define RS_ISEQ(X,Y) ((X)->addr_ip == (Y)->addr_ip && \ (X)->addr_port == (Y)->addr_port && \ - (X)->weight == (Y)->weight) + (X)->iweight == (Y)->iweight) /* Global vars exported */ extern check_conf_data *check_data; diff -uNr keepalived-1.1.20/keepalived/vrrp/vrrp_arp.c keepalived-fixes/keepalived/vrrp/vrrp_arp.c --- keepalived-1.1.20/keepalived/vrrp/vrrp_arp.c 2010-05-06 17:53:04.000000000 +0200 +++ keepalived-fixes/keepalived/vrrp/vrrp_arp.c 2010-11-12 17:16:39.000000000 +0100 @@ -27,7 +27,7 @@ #include "utils.h" /* system includes */ -#include <linux/if_packet.h> +#include <netpacket/packet.h> /* global vars */ char *garp_buffer; diff -uNr keepalived-1.1.20/keepalived/vrrp/vrrp_daemon.c keepalived-fixes/keepalived/vrrp/vrrp_daemon.c --- keepalived-1.1.20/keepalived/vrrp/vrrp_daemon.c 2010-05-06 17:53:14.000000000 +0200 +++ keepalived-fixes/keepalived/vrrp/vrrp_daemon.c 2010-11-12 17:16:39.000000000 +0100 @@ -236,7 +236,7 @@ } /* We catch a SIGCHLD, handle it */ - log_message(LOG_INFO, "VRRP child process(%d) died: Respawning", pid); + log_message(LOG_ALERT, "VRRP child process(%d) died: Respawning", pid); start_vrrp_child(); return 0; } diff -uNr keepalived-1.1.20/keepalived/vrrp/vrrp_data.c keepalived-fixes/keepalived/vrrp/vrrp_data.c --- keepalived-1.1.20/keepalived/vrrp/vrrp_data.c 2010-05-06 17:53:18.000000000 +0200 +++ keepalived-fixes/keepalived/vrrp/vrrp_data.c 2010-11-12 17:16:39.000000000 +0100 @@ -192,6 +192,7 @@ dump_vrrp(void *data) { vrrp_rt *vrrp = data; + char auth_data[sizeof(vrrp->auth_data) + 1]; log_message(LOG_INFO, " VRRP Instance = %s", vrrp->iname); if (vrrp->init_state == VRRP_STATE_BACK) @@ -223,7 +224,10 @@ log_message(LOG_INFO, " Authentication type = %s", (vrrp->auth_type == VRRP_AUTH_AH) ? "IPSEC_AH" : "SIMPLE_PASSWORD"); - log_message(LOG_INFO, " Password = %s", vrrp->auth_data); + /* vrrp->auth_data is not \0 terminated */ + memcpy(auth_data, vrrp->auth_data, sizeof(vrrp->auth_data)); + auth_data[sizeof(vrrp->auth_data)] = '\0'; + log_message(LOG_INFO, " Password = %s", auth_data); } if (!LIST_ISEMPTY(vrrp->track_ifp)) { log_message(LOG_INFO, " Tracked interfaces = %d", LIST_SIZE(vrrp->track_ifp)); diff -uNr keepalived-1.1.20/keepalived/vrrp/vrrp_parser.c keepalived-fixes/keepalived/vrrp/vrrp_parser.c --- keepalived-1.1.20/keepalived/vrrp/vrrp_parser.c 2010-05-06 17:54:09.000000000 +0200 +++ keepalived-fixes/keepalived/vrrp/vrrp_parser.c 2010-11-12 17:16:39.000000000 +0100 @@ -167,8 +167,9 @@ log_message(LOG_INFO, "VRRP Error : Priority not valid !\n"); log_message(LOG_INFO, " must be between 1 & 255. reconfigure !\n"); - log_message(LOG_INFO, " Using default value : 100\n"); - vrrp->effective_priority = vrrp->base_priority = 100; + log_message(LOG_INFO, + " Using default value : %d\n", VRRP_PRIO_DFL); + vrrp->effective_priority = vrrp->base_priority = VRRP_PRIO_DFL; } } static void @@ -297,11 +298,11 @@ int max_size = sizeof (vrrp->auth_data); int str_len = strlen(str); - if (str_len > max_size - 1) - str_len = max_size - 1; + if (str_len > max_size) + str_len = max_size; + memset(vrrp->auth_data, 0, max_size); memcpy(vrrp->auth_data, str, str_len); - vrrp->auth_data[str_len] = '\0'; } static void vrrp_vip_handler(vector strvec) diff -uNr keepalived-1.1.20/keepalived/vrrp/vrrp_scheduler.c keepalived-fixes/keepalived/vrrp/vrrp_scheduler.c --- keepalived-1.1.20/keepalived/vrrp/vrrp_scheduler.c 2010-05-06 17:54:12.000000000 +0200 +++ keepalived-fixes/keepalived/vrrp/vrrp_scheduler.c 2010-11-12 17:16:39.000000000 +0100 @@ -210,7 +210,6 @@ ELEMENT_NEXT(e)) { sc = ELEMENT_DATA(e); if (sc->weight) { - sc->weight = 0; sc->scr->inuse--; warning++; } @@ -219,7 +218,7 @@ if (warning > 0) { log_message(LOG_INFO, "VRRP_Instance(%s) : ignoring " - "track weights due to SYNC group", + "tracked script with weights due to SYNC group", vrrp->iname); } } else { diff -uNr keepalived-1.1.20/keepalived/vrrp/vrrp_sync.c keepalived-fixes/keepalived/vrrp/vrrp_sync.c --- keepalived-1.1.20/keepalived/vrrp/vrrp_sync.c 2010-05-06 17:54:16.000000000 +0200 +++ keepalived-fixes/keepalived/vrrp/vrrp_sync.c 2010-11-12 17:16:39.000000000 +0100 @@ -154,7 +154,7 @@ /* Perform sync index */ for (e = LIST_HEAD(l); e; ELEMENT_NEXT(e)) { isync = ELEMENT_DATA(e); - if (isync != vrrp) { + if (isync != vrrp && isync->wantstate != VRRP_STATE_GOTO_MASTER) { /* Force a new protocol master election */ isync->wantstate = VRRP_STATE_GOTO_MASTER; log_message(LOG_INFO, diff -uNr keepalived-1.1.20/keepalived/vrrp/vrrp_track.c keepalived-fixes/keepalived/vrrp/vrrp_track.c --- keepalived-1.1.20/keepalived/vrrp/vrrp_track.c 2010-05-06 17:54:22.000000000 +0200 +++ keepalived-fixes/keepalived/vrrp/vrrp_track.c 2010-11-12 17:16:39.000000000 +0100 @@ -196,6 +196,9 @@ for (e = LIST_HEAD(l); e; ELEMENT_NEXT(e)) { tsc = ELEMENT_DATA(e); + if ((tsc->scr->result == VRRP_SCRIPT_STATUS_DISABLED) || + (tsc->scr->result == VRRP_SCRIPT_STATUS_INIT_GOOD)) + continue; if (!tsc->weight && tsc->scr->result < tsc->scr->rise) return 0; } @@ -217,6 +220,8 @@ for (e = LIST_HEAD(l); e; ELEMENT_NEXT(e)) { tsc = ELEMENT_DATA(e); + if (tsc->scr->result == VRRP_SCRIPT_STATUS_DISABLED) + continue; if (tsc->scr->result >= tsc->scr->rise) { if (tsc->weight > 0) weight += tsc->weight;