From b0bf621d1aae2282ccff65fa4f8b63b173c665a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Thu, 4 Dec 2008 09:47:45 +0000 Subject: [PATCH] - aead support was included into upstream version - patch for moving libs is now deprecated - update to 2.6.27 --- .cvsignore | 2 +- iproute-ip-man.patch | 6 +- iproute.spec | 19 +-- iproute2-2.6.25-aead.patch | 212 ------------------------------ iproute2-2.6.25-segfault.patch | 6 +- iproute2-2.6.9-kernel.patch | 6 +- iproute2-movelib.patch | 27 ---- iproute2-ss050901-opt_flags.patch | 6 +- sources | 2 +- 9 files changed, 24 insertions(+), 262 deletions(-) delete mode 100644 iproute2-2.6.25-aead.patch delete mode 100644 iproute2-movelib.patch diff --git a/.cvsignore b/.cvsignore index b54b712..c94dd7d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -iproute2-2.6.26.tar.bz2 +iproute2-2.6.27.tar.gz diff --git a/iproute-ip-man.patch b/iproute-ip-man.patch index 38c191d..a68cb20 100644 --- a/iproute-ip-man.patch +++ b/iproute-ip-man.patch @@ -1,6 +1,6 @@ -diff -up iproute-2.6.26/iproute2-2.6.26/man/man8/ip.8.mm iproute-2.6.26/iproute2-2.6.26/man/man8/ip.8 ---- iproute-2.6.26/iproute2-2.6.26/man/man8/ip.8.mm 2008-07-25 22:46:07.000000000 +0200 -+++ iproute-2.6.26/iproute2-2.6.26/man/man8/ip.8 2008-08-12 14:24:01.000000000 +0200 +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 @@ -190,6 +190,8 @@ replace " | " monitor " } " .IR NUMBER " ] [ " .B cwnd diff --git a/iproute.spec b/iproute.spec index c8757b3..5ccc475 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.26 +Version: 2.6.27 Release: 1%{?dist} Group: Applications/System -Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.bz2 +Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.gz #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-movelib.patch -Patch5: iproute2-2.6.25-aead.patch -Patch6: iproute2-2.6.25-segfault.patch +Patch4: iproute2-2.6.25-segfault.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 iproute-%{version} +%setup -q -c iproute2-%{version} %patch1 -p1 -b .kernel %patch2 -p1 -b .opt_flags %patch3 -p1 -%patch4 -p1 -b .movelib -%patch5 -p1 -b .aead -#%patch6 -p1 -b .seg +%patch4 -p1 -b .seg %build export LIBDIR=%{_libdir} @@ -109,6 +105,11 @@ EOF %config(noreplace) %{_sysconfdir}/sysconfig/cbq/* %changelog +* Thu Dec 4 2008 Marcela Maslanova - 2.6.27-1 +- aead support was included into upstream version +- patch for moving libs is now deprecated +- update to 2.6.27 + * Tue Aug 12 2008 Marcela Maslanova - 2.6.26-1 - update to 2.6.26 - clean patches diff --git a/iproute2-2.6.25-aead.patch b/iproute2-2.6.25-aead.patch deleted file mode 100644 index 6e9c1a2..0000000 --- a/iproute2-2.6.25-aead.patch +++ /dev/null @@ -1,212 +0,0 @@ -diff -up iproute-2.6.26/iproute2-2.6.26/include/linux/xfrm.h.aead iproute-2.6.26/iproute2-2.6.26/include/linux/xfrm.h ---- iproute-2.6.26/iproute2-2.6.26/include/linux/xfrm.h.aead 2008-07-25 22:46:07.000000000 +0200 -+++ iproute-2.6.26/iproute2-2.6.26/include/linux/xfrm.h 2008-08-12 15:16:13.000000000 +0200 -@@ -428,12 +428,14 @@ struct xfrm_user_migrate { - __u16 new_family; - }; - -+#ifndef __KERNEL__ - /* backwards compatibility for userspace */ - #define XFRMGRP_ACQUIRE 1 - #define XFRMGRP_EXPIRE 2 - #define XFRMGRP_SA 4 - #define XFRMGRP_POLICY 8 - #define XFRMGRP_REPORT 0x20 -+#endif - - enum xfrm_nlgroups { - XFRMNLGRP_NONE, -diff -up iproute-2.6.26/iproute2-2.6.26/ip/ipxfrm.c.aead iproute-2.6.26/iproute2-2.6.26/ip/ipxfrm.c ---- iproute-2.6.26/iproute2-2.6.26/ip/ipxfrm.c.aead 2008-07-25 22:46:07.000000000 +0200 -+++ iproute-2.6.26/iproute2-2.6.26/ip/ipxfrm.c 2008-08-12 15:16:13.000000000 +0200 -@@ -154,7 +154,8 @@ const char *strxf_xfrmproto(__u8 proto) - - static const struct typeent algo_types[]= { - { "enc", XFRMA_ALG_CRYPT }, { "auth", XFRMA_ALG_AUTH }, -- { "comp", XFRMA_ALG_COMP }, { NULL, -1 } -+ { "comp", XFRMA_ALG_COMP }, { "aead", XFRMA_ALG_AEAD }, -+ { NULL, -1 } - }; - - int xfrm_algotype_getbyname(char *name) -@@ -525,8 +526,8 @@ void xfrm_selector_print(struct xfrm_sel - fprintf(fp, "%s", _SL_); - } - --static void xfrm_algo_print(struct xfrm_algo *algo, int type, int len, -- FILE *fp, const char *prefix) -+static void __xfrm_algo_print(struct xfrm_algo *algo, int type, int len, -+ FILE *fp, const char *prefix, int newline) - { - int keylen; - int i; -@@ -558,6 +559,32 @@ static void xfrm_algo_print(struct xfrm_ - fprintf(fp, " (%d bits)", algo->alg_key_len); - - fin: -+ if (newline) -+ fprintf(fp, "%s", _SL_); -+} -+ -+static inline void xfrm_algo_print(struct xfrm_algo *algo, int type, int len, -+ FILE *fp, const char *prefix) -+{ -+ return __xfrm_algo_print(algo, type, len, fp, prefix, 1); -+} -+ -+static void xfrm_aead_print(struct xfrm_algo_aead *algo, int len, -+ FILE *fp, const char *prefix) -+{ -+ struct { -+ struct xfrm_algo algo; -+ char key[algo->alg_key_len / 8]; -+ } base; -+ -+ memcpy(base.algo.alg_name, algo->alg_name, sizeof(base.algo.alg_name)); -+ base.algo.alg_key_len = algo->alg_key_len; -+ memcpy(base.algo.alg_key, algo->alg_key, algo->alg_key_len / 8); -+ -+ __xfrm_algo_print(&base.algo, XFRMA_ALG_AEAD, len, fp, prefix, 0); -+ -+ fprintf(fp, " %d", algo->alg_icv_len); -+ - fprintf(fp, "%s", _SL_); - } - -@@ -635,6 +662,12 @@ void xfrm_xfrma_print(struct rtattr *tb[ - XFRMA_ALG_AUTH, RTA_PAYLOAD(rta), fp, prefix); - } - -+ if (tb[XFRMA_ALG_AEAD]) { -+ struct rtattr *rta = tb[XFRMA_ALG_AEAD]; -+ xfrm_aead_print((struct xfrm_algo_aead *)RTA_DATA(rta), -+ RTA_PAYLOAD(rta), fp, prefix); -+ } -+ - if (tb[XFRMA_ALG_CRYPT]) { - struct rtattr *rta = tb[XFRMA_ALG_CRYPT]; - xfrm_algo_print((struct xfrm_algo *) RTA_DATA(rta), -diff -up iproute-2.6.26/iproute2-2.6.26/ip/xfrm_state.c.aead iproute-2.6.26/iproute2-2.6.26/ip/xfrm_state.c ---- iproute-2.6.26/iproute2-2.6.26/ip/xfrm_state.c.aead 2008-07-25 22:46:07.000000000 +0200 -+++ iproute-2.6.26/iproute2-2.6.26/ip/xfrm_state.c 2008-08-12 15:16:13.000000000 +0200 -@@ -89,8 +89,10 @@ static void usage(void) - fprintf(stderr, "ENCAP-TYPE := espinudp | espinudp-nonike\n"); - - fprintf(stderr, "ALGO-LIST := [ ALGO-LIST ] | [ ALGO ]\n"); -- fprintf(stderr, "ALGO := ALGO_TYPE ALGO_NAME ALGO_KEY\n"); -+ fprintf(stderr, "ALGO := ALGO_TYPE ALGO_NAME ALGO_KEY " -+ "[ ALGO_ICV_LEN ]\n"); - fprintf(stderr, "ALGO_TYPE := [ "); -+ fprintf(stderr, "%s | ", strxf_algotype(XFRMA_ALG_AEAD)); - fprintf(stderr, "%s | ", strxf_algotype(XFRMA_ALG_CRYPT)); - fprintf(stderr, "%s | ", strxf_algotype(XFRMA_ALG_AUTH)); - fprintf(stderr, "%s ", strxf_algotype(XFRMA_ALG_COMP)); -@@ -113,7 +115,7 @@ static void usage(void) - } - - static int xfrm_algo_parse(struct xfrm_algo *alg, enum xfrm_attr_type_t type, -- char *name, char *key, int max) -+ char *name, char *key, char *buf, int max) - { - int len; - int slen = strlen(key); -@@ -153,7 +155,7 @@ static int xfrm_algo_parse(struct xfrm_a - if (get_u8(&val, vbuf, 16)) - invarg("\"ALGOKEY\" is invalid", key); - -- alg->alg_key[j] = val; -+ buf[j] = val; - } - } else { - len = slen; -@@ -161,7 +163,7 @@ static int xfrm_algo_parse(struct xfrm_a - if (len > max) - invarg("\"ALGOKEY\" makes buffer overflow\n", key); - -- strncpy(alg->alg_key, key, len); -+ strncpy(buf, key, len); - } - } - -@@ -235,6 +237,7 @@ static int xfrm_state_modify(int cmd, un - } req; - struct xfrm_replay_state replay; - char *idp = NULL; -+ char *aeadop = NULL; - char *ealgop = NULL; - char *aalgop = NULL; - char *calgop = NULL; -@@ -327,20 +330,31 @@ static int xfrm_state_modify(int cmd, un - /* try to assume ALGO */ - int type = xfrm_algotype_getbyname(*argv); - switch (type) { -+ case XFRMA_ALG_AEAD: - case XFRMA_ALG_CRYPT: - case XFRMA_ALG_AUTH: - case XFRMA_ALG_COMP: - { - /* ALGO */ - struct { -- struct xfrm_algo alg; -+ union { -+ struct xfrm_algo alg; -+ struct xfrm_algo_aead aead; -+ } u; - char buf[XFRM_ALGO_KEY_BUF_SIZE]; -- } alg; -+ } alg = {}; - int len; -+ __u32 icvlen; - char *name; - char *key; -+ char *buf; - - switch (type) { -+ case XFRMA_ALG_AEAD: -+ if (aeadop) -+ duparg("ALGOTYPE", *argv); -+ aeadop = *argv; -+ break; - case XFRMA_ALG_CRYPT: - if (ealgop) - duparg("ALGOTYPE", *argv); -@@ -371,11 +385,27 @@ static int xfrm_state_modify(int cmd, un - NEXT_ARG(); - key = *argv; - -- memset(&alg, 0, sizeof(alg)); -+ buf = alg.u.alg.alg_key; -+ len = sizeof(alg.u.alg); -+ -+ if (type != XFRMA_ALG_AEAD) -+ goto parse_algo; -+ -+ if (!NEXT_ARG_OK()) -+ missarg("ALGOICVLEN"); -+ NEXT_ARG(); -+ if (get_u32(&icvlen, *argv, 0)) -+ invarg("\"aead\" ICV length is invalid", -+ *argv); -+ alg.u.aead.alg_icv_len = icvlen; -+ -+ buf = alg.u.aead.alg_key; -+ len = sizeof(alg.u.aead); - -+parse_algo: - xfrm_algo_parse((void *)&alg, type, name, key, -- sizeof(alg.buf)); -- len = sizeof(struct xfrm_algo) + alg.alg.alg_key_len; -+ buf, sizeof(alg.buf)); -+ len += alg.u.alg.alg_key_len; - - addattr_l(&req.n, sizeof(req.buf), type, - (void *)&alg, len); -@@ -432,7 +462,7 @@ static int xfrm_state_modify(int cmd, un - break; - } - -- if (ealgop || aalgop || calgop) { -+ if (aeadop || ealgop || aalgop || calgop) { - if (!xfrm_xfrmproto_is_ipsec(req.xsinfo.id.proto)) { - fprintf(stderr, "\"ALGO\" is invalid with proto=%s\n", - strxf_xfrmproto(req.xsinfo.id.proto)); diff --git a/iproute2-2.6.25-segfault.patch b/iproute2-2.6.25-segfault.patch index 48a680d..05eb100 100644 --- a/iproute2-2.6.25-segfault.patch +++ b/iproute2-2.6.25-segfault.patch @@ -1,6 +1,6 @@ -diff -up iproute-2.6.26/iproute2-2.6.26/ip/xfrm_state.c.seg iproute-2.6.26/iproute2-2.6.26/ip/xfrm_state.c ---- iproute-2.6.26/iproute2-2.6.26/ip/xfrm_state.c.seg 2008-07-21 17:23:12.000000000 +0200 -+++ iproute-2.6.26/iproute2-2.6.26/ip/xfrm_state.c 2008-07-22 09:27:12.000000000 +0200 +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 @@ -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 8df74b3..d46cf02 100644 --- a/iproute2-2.6.9-kernel.patch +++ b/iproute2-2.6.9-kernel.patch @@ -1,6 +1,6 @@ -diff -up iproute-2.6.26/iproute2-2.6.26/Makefile.kernel iproute-2.6.26/iproute2-2.6.26/Makefile ---- iproute-2.6.26/iproute2-2.6.26/Makefile.kernel 2008-07-25 22:46:07.000000000 +0200 -+++ iproute-2.6.26/iproute2-2.6.26/Makefile 2008-08-12 14:19:58.000000000 +0200 +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 @@ -3,6 +3,7 @@ SBINDIR=/sbin CONFDIR=/etc/iproute2 DOCDIR=/share/doc/iproute2 diff --git a/iproute2-movelib.patch b/iproute2-movelib.patch deleted file mode 100644 index 58b883c..0000000 --- a/iproute2-movelib.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up iproute-2.6.26/iproute2-2.6.26/netem/Makefile.lib iproute-2.6.26/iproute2-2.6.26/netem/Makefile ---- iproute-2.6.26/iproute2-2.6.26/netem/Makefile.lib 2008-07-25 22:46:07.000000000 +0200 -+++ iproute-2.6.26/iproute2-2.6.26/netem/Makefile 2008-08-12 14:31:54.000000000 +0200 -@@ -20,9 +20,9 @@ stats: stats.c - $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm - - install: all -- mkdir -p $(DESTDIR)/lib/tc -+ mkdir -p $(DESTDIR)/share/tc - for i in $(DISTDATA); \ -- do install -m 755 $$i $(DESTDIR)/lib/tc; \ -+ do install -m 755 $$i $(DESTDIR)/share/tc; \ - done - - clean: -diff -up iproute-2.6.26/iproute2-2.6.26/tc/tc_util.c.lib iproute-2.6.26/iproute2-2.6.26/tc/tc_util.c ---- iproute-2.6.26/iproute2-2.6.26/tc/tc_util.c.lib 2008-07-25 22:46:07.000000000 +0200 -+++ iproute-2.6.26/iproute2-2.6.26/tc/tc_util.c 2008-08-12 14:32:54.000000000 +0200 -@@ -34,7 +34,7 @@ const char *get_tc_lib(void) - - lib_dir = getenv("TC_LIB_DIR"); - if (!lib_dir) -- lib_dir = DESTDIR "/lib/tc"; -+ lib_dir = DESTDIR "/share/tc"; - - return lib_dir; - } diff --git a/iproute2-ss050901-opt_flags.patch b/iproute2-ss050901-opt_flags.patch index c23f857..0d59b45 100644 --- a/iproute2-ss050901-opt_flags.patch +++ b/iproute2-ss050901-opt_flags.patch @@ -1,6 +1,6 @@ -diff -up iproute-2.6.26/iproute2-2.6.26/Makefile.opt iproute-2.6.26/iproute2-2.6.26/Makefile ---- iproute-2.6.26/iproute2-2.6.26/Makefile.opt 2008-08-12 14:19:58.000000000 +0200 -+++ iproute-2.6.26/iproute2-2.6.26/Makefile 2008-08-12 14:21:42.000000000 +0200 +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 @@ -22,7 +22,7 @@ ADDLIB+=ipx_ntop.o ipx_pton.o CC = gcc diff --git a/sources b/sources index c69fe31..8677041 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7d221e735cba05709341cd46401c4ecd iproute2-2.6.26.tar.bz2 +70f9c837ba9fd7d9f15fd39aba1b14c9 iproute2-2.6.27.tar.gz