|
@@ -0,0 +1,620 @@
+diff -uNr keepalived-1.2.0/configure.in keepalived-fixes-1.2.0/configure.in
+--- keepalived-1.2.0/configure.in 2009-11-05 18:23:04.000000000 +0100
++++ keepalived-fixes-1.2.0/configure.in 2010-11-12 19:00:45.000000000 +0100
+@@ -44,6 +44,8 @@
+ AC_CHECK_HEADERS(openssl/ssl.h openssl/md5.h openssl/err.h,,AC_MSG_ERROR([
+ !!! OpenSSL is not properly installed on your system. !!!
+ !!! Can not include OpenSSL headers files. !!!]))
++AC_CHECK_DECL([ETHERTYPE_IPV6],[],[CFLAGS="$CFLAGS -DETHERTYPE_IPV6=0x86dd"],
++ [[@%:@include <net/ethernet.h>]])
+
+ dnl ----[ Checks for libraries ]----
+ AC_CHECK_LIB(crypto, MD5_Init,,AC_MSG_ERROR([OpenSSL libraries are required]))
+diff -uNr keepalived-1.2.0/doc/man/man5/keepalived.conf.5 keepalived-fixes-1.2.0/doc/man/man5/keepalived.conf.5
+--- keepalived-1.2.0/doc/man/man5/keepalived.conf.5 2009-09-28 12:56:54.000000000 +0200
++++ keepalived-fixes-1.2.0/doc/man/man5/keepalived.conf.5 2010-11-12 19:00:45.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.2.0/goodies/arpreset.pl keepalived-fixes-1.2.0/goodies/arpreset.pl
+--- keepalived-1.2.0/goodies/arpreset.pl 1970-01-01 01:00:00.000000000 +0100
++++ keepalived-fixes-1.2.0/goodies/arpreset.pl 2010-11-12 19:00:45.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.2.0/.indent.pro keepalived-fixes-1.2.0/.indent.pro
+--- keepalived-1.2.0/.indent.pro 1970-01-01 01:00:00.000000000 +0100
++++ keepalived-fixes-1.2.0/.indent.pro 2010-11-12 19:00:45.000000000 +0100
+@@ -0,0 +1,8 @@
++-kr
++-i8
++-ts8
++-sob
++-l80
++-ss
++-bs
++-psl
+diff -uNr keepalived-1.2.0/keepalived/check/check_data.c keepalived-fixes-1.2.0/keepalived/check/check_data.c
+--- keepalived-1.2.0/keepalived/check/check_data.c 2010-05-06 17:48:22.000000000 +0200
++++ keepalived-fixes-1.2.0/keepalived/check/check_data.c 2010-11-12 19:00:45.000000000 +0100
+@@ -261,6 +261,7 @@
+
+ vs->s_svr = (real_server *) MALLOC(sizeof (real_server));
|