OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 19-Feb-2006 09:01:47 Branch: HEAD Handle: 2006021908014601 Modified files: openpkg-src/ucarp ucarp.patch ucarp.spec Log: upgrading package: ucarp 1.1 -> 1.2 Summary: Revision Changes Path 1.3 +124 -57 openpkg-src/ucarp/ucarp.patch 1.13 +4 -29 openpkg-src/ucarp/ucarp.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/ucarp/ucarp.patch ============================================================================ $ cvs diff -u -r1.2 -r1.3 ucarp.patch --- openpkg-src/ucarp/ucarp.patch 3 Nov 2004 13:24:01 -0000 1.2 +++ openpkg-src/ucarp/ucarp.patch 19 Feb 2006 08:01:46 -0000 1.3 @@ -1,7 +1,18 @@ +Index: src/carp.c +--- src/carp.c.orig 2006-02-19 00:06:17 +0100 ++++ src/carp.c 2006-02-19 08:25:51 +0100 +@@ -133,7 +133,7 @@ + return (unsigned short) ~sum; + } + +-static void carp_hmac_generate(struct carp_softc *sc, u_int32_t counter[2], ++static void carp_hmac_generate(struct carp_softc *sc, uint32_t counter[2], + unsigned char *md) + { + SHA1_CTX ctx; Index: src/fillmac.c -diff -Nau src/fillmac.c.orig src/fillmac.c ---- src/fillmac.c.orig 2004-11-02 13:44:05.332518385 +0100 -+++ src/fillmac.c 2004-11-02 14:19:17.771423871 +0100 +--- src/fillmac.c.orig 2004-08-28 17:15:36 +0200 ++++ src/fillmac.c 2006-02-19 08:25:50 +0100 @@ -102,7 +102,7 @@ } return -1; @@ -27,57 +38,113 @@ logfile(LOG_ERR, _("Interface [%s] not found"), interface); ALLOCA_FREE(lifrspace); return -1; -Index: src/ucarp_p.h -diff -Nau src/ucarp_p.h.orig src/ucarp_p.h ---- src/ucarp_p.h.orig 2004-11-02 15:46:51.076457056 +0100 -+++ src/ucarp_p.h 2004-11-02 16:06:45.548484801 +0100 -@@ -1,7 +1,7 @@ - #ifndef __CARP_P_H__ - #define __CARP_P_H__ 1 - --static const char *GETOPT_OPTIONS = "i:s:v:p:Pa:hb:k:u:d:r:zf:B"; -+static const char *GETOPT_OPTIONS = ""; - - static struct option long_options[] = { - { "interface", 1, NULL, 'i' }, -Index: src/ucarp.c -diff -Nau src/ucarp.c.orig src/ucarp.c ---- src/ucarp.c.orig 2004-08-28 18:04:05.000000000 +0200 -+++ src/ucarp.c 2004-11-02 16:10:59.801007425 +0100 -@@ -23,21 +23,21 @@ - { - puts("\n" PACKAGE_STRING " - " __DATE__ "\n"); - fputs(_( -- "--interface=<if> (-i <if>): bind interface <if>\n" -- "--srcip=<ip> (-s <ip>): source (real) IP address of that host\n" -- "--vhid=<id> (-v <id>): virtual IP identifier (1-255)\n" -- "--pass=<pass> (-p <pass>): password\n" -- "--preempt (-P): becomes a master as soon as possible\n" -- "--addr=<ip> (-a <ip>): virtual shared IP address\n" -- "--help (-h): summary of command-line options\n" -- "--advbase=<seconds> (-b <seconds>): advertisement frequency\n" -- "--advskew=<skew> (-k <skew>): advertisement skew (0-255)\n" -- "--upscript=<file> (-u <file>): run <file> to become a master\n" -- "--downscript=<file> (-d <file>): run <file> to become a backup\n" -- "--deadratio=<ratio> (-r <ratio>): ratio to consider a host as dead\n" -- "--shutdown (-z): call shutdown script at exit\n" -- "--daemonize (-B): run in background\n" -- "--facility=<facility> (-f): set syslog facility (default=daemon)\n" -+ "--interface=<if>: bind interface <if>\n" -+ "--srcip=<ip>: source (real) IP address of that host\n" -+ "--vhid=<id>: virtual IP identifier (1-255)\n" -+ "--pass=<pass>: password\n" -+ "--preempt: becomes a master as soon as possible\n" -+ "--addr=<ip>: virtual shared IP address\n" -+ "--help: summary of command-line options\n" -+ "--advbase=<seconds>: advertisement frequency\n" -+ "--advskew=<skew>: advertisement skew (0-255)\n" -+ "--upscript=<file>: run <file> to become a master\n" -+ "--downscript=<file>: run <file> to become a backup\n" -+ "--deadratio=<ratio>: ratio to consider a host as dead\n" -+ "--shutdown: call shutdown script at exit\n" -+ "--daemonize: run in background\n" -+ "--facility=<facility>: set syslog facility (default=daemon)\n" - "\n" - "Sample usage:\n" - "\n" +Index: src/ip_carp.h +--- src/ip_carp.h.orig 2006-02-19 00:03:58 +0100 ++++ src/ip_carp.h 2006-02-19 08:25:51 +0100 +@@ -56,19 +56,19 @@ + + struct carp_header { + #ifdef WORDS_BIGENDIAN +- u_int8_t carp_version:4, ++ uint8_t carp_version:4, + carp_type:4; + #else +- u_int8_t carp_type:4, ++ uint8_t carp_type:4, + carp_version:4; + #endif +- u_int8_t carp_vhid; /* virtual host id */ +- u_int8_t carp_advskew; /* advertisement skew */ +- u_int8_t carp_authlen; /* size of counter+md, 32bit chunks */ +- u_int8_t carp_pad1; /* reserved */ +- u_int8_t carp_advbase; /* advertisement interval */ +- u_int16_t carp_cksum; +- u_int32_t carp_counter[2]; ++ uint8_t carp_vhid; /* virtual host id */ ++ uint8_t carp_advskew; /* advertisement skew */ ++ uint8_t carp_authlen; /* size of counter+md, 32bit chunks */ ++ uint8_t carp_pad1; /* reserved */ ++ uint8_t carp_advbase; /* advertisement interval */ ++ uint16_t carp_cksum; ++ uint32_t carp_counter[2]; + unsigned char carp_md[20]; /* SHA1 HMAC */ + } __packed; + +@@ -91,24 +91,24 @@ + * Statistics. + */ + struct carpstats { +- u_int64_t carps_ipackets; /* total input packets, IPv4 */ +- u_int64_t carps_ipackets6; /* total input packets, IPv6 */ +- u_int64_t carps_badif; /* wrong interface */ +- u_int64_t carps_badttl; /* TTL is not CARP_DFLTTL */ +- u_int64_t carps_hdrops; /* packets shorter than header */ +- u_int64_t carps_badsum; /* bad checksum */ +- u_int64_t carps_badver; /* bad (incl unsupp) version */ +- u_int64_t carps_badlen; /* data length does not match */ +- u_int64_t carps_badauth; /* bad authentication */ +- u_int64_t carps_badvhid; /* bad VHID */ +- u_int64_t carps_badaddrs; /* bad address list */ +- +- u_int64_t carps_opackets; /* total output packets, IPv4 */ +- u_int64_t carps_opackets6; /* total output packets, IPv6 */ +- u_int64_t carps_onomem; /* no memory for an mbuf */ +- u_int64_t carps_ostates; /* total state updates sent */ ++ uint64_t carps_ipackets; /* total input packets, IPv4 */ ++ uint64_t carps_ipackets6; /* total input packets, IPv6 */ ++ uint64_t carps_badif; /* wrong interface */ ++ uint64_t carps_badttl; /* TTL is not CARP_DFLTTL */ ++ uint64_t carps_hdrops; /* packets shorter than header */ ++ uint64_t carps_badsum; /* bad checksum */ ++ uint64_t carps_badver; /* bad (incl unsupp) version */ ++ uint64_t carps_badlen; /* data length does not match */ ++ uint64_t carps_badauth; /* bad authentication */ ++ uint64_t carps_badvhid; /* bad VHID */ ++ uint64_t carps_badaddrs; /* bad address list */ ++ ++ uint64_t carps_opackets; /* total output packets, IPv4 */ ++ uint64_t carps_opackets6; /* total output packets, IPv6 */ ++ uint64_t carps_onomem; /* no memory for an mbuf */ ++ uint64_t carps_ostates; /* total state updates sent */ + +- u_int64_t carps_preempt; /* if enabled, preemptions */ ++ uint64_t carps_preempt; /* if enabled, preemptions */ + }; + + /* +Index: src/ucarp.h +--- src/ucarp.h.orig 2004-08-28 18:10:28 +0200 ++++ src/ucarp.h 2006-02-19 08:25:51 +0100 +@@ -63,10 +63,10 @@ + #include <pcap.h> + + #ifdef __sun__ +-# define u_int8_t uint8_t +-# define u_int16_t uint16_t +-# define u_int32_t uint32_t +-# define u_int64_t uint64_t ++# define uint8_t uint8_t ++# define uint16_t uint16_t ++# define uint32_t uint32_t ++# define uint64_t uint64_t + # define ether_shost ether_shost.ether_addr_octet + # define ether_dhost ether_dhost.ether_addr_octet + #endif +@@ -122,7 +122,7 @@ + # define IPPROTO_CARP 112 + #endif + #ifndef INADDR_CARP_GROUP +-# define __OBSD_IPADDR(x) ((u_int32_t) htonl((u_int32_t)(x))) ++# define __OBSD_IPADDR(x) ((uint32_t) htonl((uint32_t)(x))) + # define INADDR_CARP_GROUP __OBSD_IPADDR(0xe0000012) /* 224.0.0.18 */ + #endif + #ifndef timercmp +@@ -194,7 +194,7 @@ + int sc_naddrs6; + int sc_advbase; /* seconds */ + int sc_init_counter; +- u_int64_t sc_counter; ++ uint64_t sc_counter; + + /* authentication */ + #define CARP_HMAC_PAD 64 @@ . patch -p0 <<'@@ .' Index: openpkg-src/ucarp/ucarp.spec ============================================================================ $ cvs diff -u -r1.12 -r1.13 ucarp.spec --- openpkg-src/ucarp/ucarp.spec 1 Jan 2006 13:23:36 -0000 1.12 +++ openpkg-src/ucarp/ucarp.spec 19 Feb 2006 08:01:47 -0000 1.13 @@ -32,8 +32,8 @@ Class: EVAL Group: Network License: Specific -Version: 1.1 -Release: 20041110 +Version: 1.2 +Release: 20060219 # package options %option with_fsl yes @@ -80,39 +80,14 @@ %prep %setup -q %patch -p0 - %{l_shtool} subst \ - -e 's;u_int\([0-9]*\)_t;uint\1_t;g' \ - src/ip_carp.h \ - src/ucarp.h \ - src/carp.c - case "%{l_platform -t}" in - *-sunos* ) - %{l_shtool} subst \ - -e 's;\(->ether_.host\)\(\[[0-9]*\]\);\1.ether_addr_octet\2;g' \ - src/carp.c - %{l_shtool} subst \ - -e 's;\(->ether_.host\),;\1.ether_addr_octet,;g' \ - src/garp.c - ;; - esac %build - # compensate for nonportable constructs - DEFFLAGS= - LIBFLAGS= - case "%{l_platform -t}" in - *-sunos* ) - DEFFLAGS="-DETHER_ADDR_LEN=6" - LIBFLAGS="-lresolv" - ;; - esac - # configure program CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ - CPPFLAGS="%{l_cppflags} $DEFFLAGS" \ + CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \ - LIBS="%{l_fsl_libs} -lpcap $LIBFLAGS" \ + LIBS="%{l_fsl_libs} -lpcap" \ ./configure \ --prefix=%{l_prefix} \ --sysconfdir=%{l_prefix}/etc/ucarp \ @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org