From 85548bc1f13c04c66580617ecaefdf4763dcdc52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Mon, 19 Jan 2009 13:02:46 +0000 Subject: [PATCH] - previous two patches were included into 2.6.28 release. - update --- .cvsignore | 2 +- ip-maddr-show.patch | 87 ------------------------------- iproute-ip-man.patch | 6 +-- iproute.spec | 16 +++--- iproute2-2.6.25-segfault.patch | 6 +-- iproute2-2.6.9-kernel.patch | 6 +-- iproute2-ss050901-opt_flags.patch | 6 +-- prefix-assigned.patch | 67 ------------------------ sources | 2 +- 9 files changed, 22 insertions(+), 176 deletions(-) delete mode 100644 ip-maddr-show.patch delete mode 100644 prefix-assigned.patch diff --git a/.cvsignore b/.cvsignore index c94dd7d..9756ac2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -iproute2-2.6.27.tar.gz +iproute2-2.6.28.tar.bz2 diff --git a/ip-maddr-show.patch b/ip-maddr-show.patch deleted file mode 100644 index c83dbd5..0000000 --- a/ip-maddr-show.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 7f71c0cae2db61890474e04ba3a26e40219e5561 Mon Sep 17 00:00:00 2001 -From: Olivier Fourdan -Date: Tue, 25 Nov 2008 12:36:22 +0000 -Subject: [PATCH] =?utf-8?q?ip=20maddr=20show=E2=80=9D=20on=20an=20infiniband=20address=20causes=20a=20stack=20corruption?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit - -“ip maddr show” on an infiniband address causes a stack corruption -because the length of the address for Infiniband (20 bytes, as -described in kernel doc Documentation/infiniband/ipoib.txt) does not -fit on the 16 bytes of the field in which it gets stored. - -The proposed patch increases the size of the hardware address from 4 -__u32 to 8 and also adds a check to avoid overriding the available -size while parsing the hardware address. - -This bug affects current upstream code AFAICT. - -Hope this helps, -Cheers, -Olivier. - -“ip maddr show ib0” causes a stack corruption because the length of the address -for Infiniband (20 see kernel doc Documentation/infiniband/ipoib.txt) does not -fit on the 16 bytes of the field in which it gets stored. - -The proposed patch increases the size of the hardware address from 4 u32 to 8 -and adds a check to avoid overriding the available size while parsing the -hardware address. ---- - include/utils.h | 2 +- - ip/ipmaddr.c | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git iproute-2.6.27/iproute2-2.6.27/include/utils.h iproute-2.6.27/iproute2-2.6.27/include/utils.h -index 5daed6b..f7ef939 100644 ---- iproute-2.6.27/iproute2-2.6.27/include/utils.h -+++ iproute-2.6.27/iproute2-2.6.27/include/utils.h -@@ -46,7 +46,7 @@ typedef struct - __u8 bytelen; - __s16 bitlen; - __u32 flags; -- __u32 data[4]; -+ __u32 data[8]; - } inet_prefix; - - #define PREFIXLEN_SPECIFIED 1 -diff --git iproute-2.6.27/iproute2-2.6.27/ip/ipmaddr.c iproute-2.6.27/iproute2-2.6.27/ip/ipmaddr.c -index 1014f83..44ffdfc 100644 ---- iproute-2.6.27/iproute2-2.6.27/ip/ipmaddr.c -+++ iproute-2.6.27/iproute2-2.6.27/ip/ipmaddr.c -@@ -43,11 +43,11 @@ static void usage(void) - exit(-1); - } - --static int parse_hex(char *str, unsigned char *addr) -+static int parse_hex(char *str, unsigned char *addr, size_t size) - { - int len=0; - -- while (*str) { -+ while (*str && (len < 2 * size)) { - int tmp; - if (str[1] == 0) - return -1; -@@ -104,7 +104,7 @@ void read_dev_mcast(struct ma_info **result_p) - - m.addr.family = AF_PACKET; - -- len = parse_hex(hexa, (unsigned char*)&m.addr.data); -+ len = parse_hex(hexa, (unsigned char*)&m.addr.data, sizeof (m.addr.data)); - if (len >= 0) { - struct ma_info *ma = malloc(sizeof(m)); - -@@ -176,7 +176,7 @@ void read_igmp6(struct ma_info **result_p) - - m.addr.family = AF_INET6; - -- len = parse_hex(hexa, (unsigned char*)&m.addr.data); -+ len = parse_hex(hexa, (unsigned char*)&m.addr.data, sizeof (m.addr.data)); - if (len >= 0) { - struct ma_info *ma = malloc(sizeof(m)); - --- -1.6.0.6 - diff --git a/iproute-ip-man.patch b/iproute-ip-man.patch index a68cb20..e26e0a3 100644 --- a/iproute-ip-man.patch +++ b/iproute-ip-man.patch @@ -1,6 +1,6 @@ -diff -up iproute2-2.6.27/iproute2-2.6.27/man/man8/ip.8.mm iproute2-2.6.27/iproute2-2.6.27/man/man8/ip.8 ---- iproute2-2.6.27/iproute2-2.6.27/man/man8/ip.8.mm 2008-07-25 22:46:07.000000000 +0200 -+++ iproute2-2.6.27/iproute2-2.6.27/man/man8/ip.8 2008-08-12 14:24:01.000000000 +0200 +diff -up iproute2-2.6.28/iproute2-2.6.28/man/man8/ip.8.mm iproute2-2.6.28/iproute2-2.6.28/man/man8/ip.8 +--- iproute2-2.6.28/iproute2-2.6.28/man/man8/ip.8.mm 2008-07-25 22:46:07.000000000 +0200 ++++ iproute2-2.6.28/iproute2-2.6.28/man/man8/ip.8 2008-08-12 14:24:01.000000000 +0200 @@ -190,6 +190,8 @@ replace " | " monitor " } " .IR NUMBER " ] [ " .B cwnd diff --git a/iproute.spec b/iproute.spec index ca05d11..91e698b 100644 --- a/iproute.spec +++ b/iproute.spec @@ -3,18 +3,16 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 2.6.27 -Release: 2%{?dist} +Version: 2.6.28 +Release: 1%{?dist} Group: Applications/System -Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.gz +Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.bz2 #Source1: iproute-doc-2.6.22.tar.gz URL: http://linux-net.osdl.org/index.php/Iproute2 Patch1: iproute2-2.6.9-kernel.patch Patch2: iproute2-ss050901-opt_flags.patch Patch3: iproute-ip-man.patch Patch4: iproute2-2.6.25-segfault.patch -Patch5: prefix-assigned.patch -Patch6: ip-maddr-show.patch License: GPLv2+ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -27,13 +25,11 @@ example) which are designed to use the advanced networking capabilities of the Linux 2.4.x and 2.6.x kernel. %prep -%setup -q -c iproute2-%{version} +%setup -q -c iproute-%{version} %patch1 -p1 -b .kernel %patch2 -p1 -b .opt_flags %patch3 -p1 %patch4 -p1 -b .seg -%patch5 -p1 -b .prefix -%patch6 -p1 -b .maddr %build export LIBDIR=%{_libdir} @@ -109,6 +105,10 @@ EOF %config(noreplace) %{_sysconfdir}/sysconfig/cbq/* %changelog +* Mon Jan 19 2009 Marcela Mašláňová - 2.6.28-1 +- previous two patches were included into 2.6.28 release. +- update + * Mon Jan 12 2009 Marcela Mašláňová - 2.6.27-2 - 475130 - Negative preferred lifetimes of IPv6 prefixes/addresses displayed incorrectly diff --git a/iproute2-2.6.25-segfault.patch b/iproute2-2.6.25-segfault.patch index 05eb100..2fecb5f 100644 --- a/iproute2-2.6.25-segfault.patch +++ b/iproute2-2.6.25-segfault.patch @@ -1,6 +1,6 @@ -diff -up iproute2-2.6.27/iproute2-2.6.27/ip/xfrm_state.c.seg iproute2-2.6.27/iproute2-2.6.27/ip/xfrm_state.c ---- iproute2-2.6.27/iproute2-2.6.27/ip/xfrm_state.c.seg 2008-07-21 17:23:12.000000000 +0200 -+++ iproute2-2.6.27/iproute2-2.6.27/ip/xfrm_state.c 2008-07-22 09:27:12.000000000 +0200 +diff -up iproute2-2.6.28/iproute2-2.6.28/ip/xfrm_state.c.seg iproute2-2.6.28/iproute2-2.6.28/ip/xfrm_state.c +--- iproute2-2.6.28/iproute2-2.6.28/ip/xfrm_state.c.seg 2008-07-21 17:23:12.000000000 +0200 ++++ iproute2-2.6.28/iproute2-2.6.28/ip/xfrm_state.c 2008-07-22 09:27:12.000000000 +0200 @@ -158,12 +158,16 @@ static int xfrm_algo_parse(struct xfrm_a buf[j] = val; } diff --git a/iproute2-2.6.9-kernel.patch b/iproute2-2.6.9-kernel.patch index d46cf02..86aae8f 100644 --- a/iproute2-2.6.9-kernel.patch +++ b/iproute2-2.6.9-kernel.patch @@ -1,6 +1,6 @@ -diff -up iproute2-2.6.27/iproute2-2.6.27/Makefile.kernel iproute2-2.6.27/iproute2-2.6.27/Makefile ---- iproute2-2.6.27/iproute2-2.6.27/Makefile.kernel 2008-07-25 22:46:07.000000000 +0200 -+++ iproute2-2.6.27/iproute2-2.6.27/Makefile 2008-08-12 14:19:58.000000000 +0200 +diff -up iproute2-2.6.28/iproute2-2.6.28/Makefile.kernel iproute2-2.6.28/iproute2-2.6.28/Makefile +--- iproute2-2.6.28/iproute2-2.6.28/Makefile.kernel 2008-07-25 22:46:07.000000000 +0200 ++++ iproute2-2.6.28/iproute2-2.6.28/Makefile 2008-08-12 14:19:58.000000000 +0200 @@ -3,6 +3,7 @@ SBINDIR=/sbin CONFDIR=/etc/iproute2 DOCDIR=/share/doc/iproute2 diff --git a/iproute2-ss050901-opt_flags.patch b/iproute2-ss050901-opt_flags.patch index 0d59b45..600a8c9 100644 --- a/iproute2-ss050901-opt_flags.patch +++ b/iproute2-ss050901-opt_flags.patch @@ -1,6 +1,6 @@ -diff -up iproute2-2.6.27/iproute2-2.6.27/Makefile.opt iproute2-2.6.27/iproute2-2.6.27/Makefile ---- iproute2-2.6.27/iproute2-2.6.27/Makefile.opt 2008-08-12 14:19:58.000000000 +0200 -+++ iproute2-2.6.27/iproute2-2.6.27/Makefile 2008-08-12 14:21:42.000000000 +0200 +diff -up iproute2-2.6.28/iproute2-2.6.28/Makefile.opt iproute2-2.6.28/iproute2-2.6.28/Makefile +--- iproute2-2.6.28/iproute2-2.6.28/Makefile.opt 2008-08-12 14:19:58.000000000 +0200 ++++ iproute2-2.6.28/iproute2-2.6.28/Makefile 2008-08-12 14:21:42.000000000 +0200 @@ -22,7 +22,7 @@ ADDLIB+=ipx_ntop.o ipx_pton.o CC = gcc diff --git a/prefix-assigned.patch b/prefix-assigned.patch deleted file mode 100644 index 37be5eb..0000000 --- a/prefix-assigned.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 037d950bceed6d5053758dea601e0d018f5f22d7 Mon Sep 17 00:00:00 2001 -From: Benedikt Gollatz -Date: Tue, 6 Jan 2009 19:36:56 -0800 -Subject: [PATCH] When the preferred lifetime of a prefix assigned by IPv6 autoconfiguration - (router solicitation) becomes negative - -How reproducible: - -Always. - -Steps to Reproduce: -1. Configure an IPv6 router to advertise a prefix with a short preferred -lifetime, e.g. 0. -2. Wait for the IPv6 autoconfiguration process to complete for an interface - connected to a link where that router advertises. -3. Run ip -6 show dev . - -Actual results: - -The preferred lifetime will have become negative, but it is printed as an -unsigned integer. The preferred lifetime to be displayed will therefore be -close to UINT_MAX. ---- - ip/ipaddress.c | 13 ++++++++++--- - 1 files changed, 10 insertions(+), 3 deletions(-) - -diff --git iproute-2.6.27/iproute2-2.6.27/ip/ipaddress.c iproute-2.6.27/iproute2-2.6.27/ip/ipaddress.c -index 51471e8..a732d80 100644 ---- iproute-2.6.27/iproute2-2.6.27/ip/ipaddress.c -+++ iproute-2.6.27/iproute2-2.6.27/ip/ipaddress.c -@@ -359,6 +359,7 @@ int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n, - FILE *fp = (FILE*)arg; - struct ifaddrmsg *ifa = NLMSG_DATA(n); - int len = n->nlmsg_len; -+ int deprecated = 0; - struct rtattr * rta_tb[IFA_MAX+1]; - char abuf[256]; - SPRINT_BUF(b1); -@@ -488,6 +489,7 @@ int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n, - } - if (ifa->ifa_flags&IFA_F_DEPRECATED) { - ifa->ifa_flags &= ~IFA_F_DEPRECATED; -+ deprecated = 1; - fprintf(fp, "deprecated "); - } - if (ifa->ifa_flags&IFA_F_HOMEADDRESS) { -@@ -516,9 +518,14 @@ int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n, - sprintf(buf, "valid_lft %usec", ci->ifa_valid); - if (ci->ifa_prefered == INFINITY_LIFE_TIME) - sprintf(buf+strlen(buf), " preferred_lft forever"); -- else -- sprintf(buf+strlen(buf), " preferred_lft %usec", -- ci->ifa_prefered); -+ else { -+ if (deprecated) -+ sprintf(buf+strlen(buf), " preferred_lft %dsec", -+ ci->ifa_prefered); -+ else -+ sprintf(buf+strlen(buf), " preferred_lft %usec", -+ ci->ifa_prefered); -+ } - fprintf(fp, " %s", buf); - } - fprintf(fp, "\n"); --- -1.6.0.6 - diff --git a/sources b/sources index 8677041..cdba727 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -70f9c837ba9fd7d9f15fd39aba1b14c9 iproute2-2.6.27.tar.gz +595f9b17320f69e8d30d2fa80f1bca14 iproute2-2.6.28.tar.bz2