From 9b3a7fc9298023a40b972c61cfac29d2e6c8a70e Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Mon, 29 Mar 2010 08:41:02 +0000 Subject: [PATCH] - update to latest upstream version --- .cvsignore | 2 +- radvd-1.3-posix.patch | 43 ----------------- radvd-1.5-overflow.patch | 100 --------------------------------------- radvd.spec | 12 ++--- sources | 2 +- 5 files changed, 7 insertions(+), 152 deletions(-) delete mode 100644 radvd-1.3-posix.patch delete mode 100644 radvd-1.5-overflow.patch diff --git a/.cvsignore b/.cvsignore index 983b99a..bed7697 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -radvd-1.5.tar.gz +radvd-1.6.tar.gz diff --git a/radvd-1.3-posix.patch b/radvd-1.3-posix.patch deleted file mode 100644 index 02102f8..0000000 --- a/radvd-1.3-posix.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -up radvd-1.3/redhat/radvd.init.posix radvd-1.3/redhat/radvd.init ---- radvd-1.3/redhat/radvd.init.posix 2009-05-25 08:17:28.000000000 +0200 -+++ radvd-1.3/redhat/radvd.init 2009-10-18 22:41:14.859329142 +0200 -@@ -47,7 +47,13 @@ case "$1" in - daemon radvd $OPTIONS - RETVAL=$? - echo -- [ $RETVAL -eq 0 ] && touch $LOCKFILE -+ if [ $RETVAL -eq 0 ]; then -+ touch $LOCKFILE -+ else -+ if [ -f $LOCKFILE ]; then -+ RETVAL=0 -+ fi -+ fi - ;; - stop) - echo -n $"Stopping $PROG: " -@@ -65,13 +71,13 @@ case "$1" in - $0 start - RETVAL=$? - ;; -- reload) -+ reload|force-reload) - echo -n $"Reloading $PROG: " - killproc radvd -HUP - RETVAL=$? - echo - ;; -- condrestart) -+ condrestart|try-restart) - if [ -f $LOCKFILE ]; then - $0 stop - $0 start -@@ -79,7 +85,7 @@ case "$1" in - fi - ;; - *) -- echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" -+ echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}" - exit 2 - esac - diff --git a/radvd-1.5-overflow.patch b/radvd-1.5-overflow.patch deleted file mode 100644 index ca77f2a..0000000 --- a/radvd-1.5-overflow.patch +++ /dev/null @@ -1,100 +0,0 @@ -diff -up radvd-1.5/send.c.patch radvd-1.5/send.c ---- radvd-1.5/send.c.patch 2009-09-07 09:59:57.000000000 +0200 -+++ radvd-1.5/send.c 2010-01-13 14:54:18.634775543 +0100 -@@ -66,6 +66,17 @@ send_ra_forall(int sock, struct Interfac - return 0; - } - -+static void -+send_ra_inc_len(size_t *len, int add) -+{ -+ *len += add; -+ if(*len >= MSG_SIZE) -+ { -+ flog(LOG_ERR, "Too many prefixes or routes. Exiting."); -+ exit(1); -+ } -+} -+ - int - send_ra(int sock, struct Interface *iface, struct in6_addr *dest) - { -@@ -80,9 +91,7 @@ send_ra(int sock, struct Interface *ifac - struct AdvPrefix *prefix; - struct AdvRoute *route; - struct AdvRDNSS *rdnss; -- /* XXX: we don't keep track if buff gets overflowed. In theory the sysadmin could -- do that with e.g., too many advertised prefixes or routes, but buff is just so -- large that this should never happen and if it does, it's admin's fault :-) */ -+ - unsigned char buff[MSG_SIZE]; - size_t len = 0; - ssize_t err; -@@ -193,7 +202,7 @@ send_ra(int sock, struct Interface *ifac - memcpy(&pinfo->nd_opt_pi_prefix, &prefix->Prefix, - sizeof(struct in6_addr)); - -- len += sizeof(*pinfo); -+ send_ra_inc_len(&len, sizeof(*pinfo)); - } - - prefix = prefix->next; -@@ -222,7 +231,7 @@ send_ra(int sock, struct Interface *ifac - - memcpy(&rinfo->nd_opt_ri_prefix, &route->Prefix, - sizeof(struct in6_addr)); -- len += sizeof(*rinfo); -+ send_ra_inc_len(&len, sizeof(*rinfo)); - - route = route->next; - } -@@ -254,7 +263,7 @@ send_ra(int sock, struct Interface *ifac - sizeof(struct in6_addr)); - memcpy(&rdnssinfo->nd_opt_rdnssi_addr3, &rdnss->AdvRDNSSAddr3, - sizeof(struct in6_addr)); -- len += sizeof(*rdnssinfo) - (3-rdnss->AdvRDNSSNumber)*sizeof(struct in6_addr); -+ send_ra_inc_len(&len, sizeof(*rdnssinfo) - (3-rdnss->AdvRDNSSNumber)*sizeof(struct in6_addr)); - - rdnss = rdnss->next; - } -@@ -273,7 +282,7 @@ send_ra(int sock, struct Interface *ifac - mtu->nd_opt_mtu_reserved = 0; - mtu->nd_opt_mtu_mtu = htonl(iface->AdvLinkMTU); - -- len += sizeof(*mtu); -+ send_ra_inc_len(&len, sizeof(*mtu)); - } - - /* -@@ -290,11 +299,11 @@ send_ra(int sock, struct Interface *ifac - *ucp++ = ND_OPT_SOURCE_LINKADDR; - *ucp++ = (uint8_t) ((iface->if_hwaddr_len + 16 + 63) >> 6); - -- len += 2 * sizeof(uint8_t); -+ send_ra_inc_len(&len, 2 * sizeof(uint8_t)); - - i = (iface->if_hwaddr_len + 7) >> 3; - memcpy(buff + len, iface->if_hwaddr, i); -- len += i; -+ send_ra_inc_len(&len, i); - } - - /* -@@ -320,7 +329,7 @@ send_ra(int sock, struct Interface *ifac - a_ival.adv_ival = htonl(ival); - - memcpy(buff + len, &a_ival, sizeof(a_ival)); -- len += sizeof(a_ival); -+ send_ra_inc_len(&len, sizeof(a_ival)); - } - - /* -@@ -342,7 +351,7 @@ send_ra(int sock, struct Interface *ifac - ha_info.lifetime = htons(iface->HomeAgentLifetime); - - memcpy(buff + len, &ha_info, sizeof(ha_info)); -- len += sizeof(ha_info); -+ send_ra_inc_len(&len, sizeof(ha_info)); - } - - iov.iov_len = len; diff --git a/radvd.spec b/radvd.spec index 41767e2..7b16030 100644 --- a/radvd.spec +++ b/radvd.spec @@ -4,8 +4,8 @@ %define RADVD_UID 75 Summary: A Router Advertisement daemon Name: radvd -Version: 1.5 -Release: 3%{?dist} +Version: 1.6 +Release: 1%{?dist} # The code includes the advertising clause, so it's GPL-incompatible License: BSD with advertising Group: System Environment/Daemons @@ -18,8 +18,6 @@ Requires(post): chkconfig Requires(pre): /usr/sbin/useradd BuildRequires: flex, byacc BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Patch1: radvd-1.3-posix.patch -Patch2: radvd-1.5-overflow.patch %description radvd is the router advertisement daemon for IPv6. It listens to router @@ -35,9 +33,6 @@ services. %prep %setup -q -%patch1 -p1 -b .posix -%patch2 -p1 -b .overflow - %build export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIE" export LDFLAGS='-pie -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen' @@ -95,6 +90,9 @@ fi %{_sbindir}/radvdump %changelog +* Mon Mar 29 2010 Jiri Skala - 1.6-1 +- update to latest upstream version + * Mon Jan 25 2010 Jiri Skala - 1.5-3 - spec file uses Source1 for radvd.init no more init from tarball - radvd.init modified to make rmplint more silent diff --git a/sources b/sources index 0ec5199..9213b01 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -78598b60ed9d64920739189c3dc0934d radvd-1.5.tar.gz +987e0660d68b4501b24dc5a068cea83c radvd-1.6.tar.gz