Add patch for AEAD compatibility. Removed the useless patch for backward
compatibility which was included in upstream.
This commit is contained in:
parent
0245faea5a
commit
20e2934642
@ -1,2 +1,2 @@
|
||||
iproute2-2.6.23.tar.bz2
|
||||
iproute-doc-2.6.22.tar.gz
|
||||
iproute2-2.6.25.tar.bz2
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -up iproute-2.6.23/iproute2-2.6.23/man/man8/ip.8.ua iproute-2.6.23/iproute2-2.6.23/man/man8/ip.8
|
||||
--- iproute-2.6.23/iproute2-2.6.23/man/man8/ip.8.ua 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.23/iproute2-2.6.23/man/man8/ip.8 2007-10-31 09:29:10.000000000 +0100
|
||||
diff -up iproute-2.6.25/iproute2-2.6.25/man/man8/ip.8.ua iproute-2.6.25/iproute2-2.6.25/man/man8/ip.8
|
||||
--- iproute-2.6.25/iproute2-2.6.25/man/man8/ip.8.ua 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.25/iproute2-2.6.25/man/man8/ip.8 2007-10-31 09:29:10.000000000 +0100
|
||||
@@ -176,6 +176,8 @@ replace " | " monitor " } "
|
||||
.IR NUMBER " ] [ "
|
||||
.B cwnd
|
||||
|
13
iproute.spec
13
iproute.spec
@ -3,8 +3,8 @@
|
||||
|
||||
Summary: Advanced IP routing and network device configuration tools
|
||||
Name: iproute
|
||||
Version: 2.6.23
|
||||
Release: 4%{?dist}
|
||||
Version: 2.6.25
|
||||
Release: 1%{?dist}
|
||||
Group: Applications/System
|
||||
Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.bz2
|
||||
#Source1: iproute-doc-2.6.22.tar.gz
|
||||
@ -15,7 +15,7 @@ Patch3: iproute2-2.6.16-ip_resolve_crash.patch
|
||||
Patch4: iproute-ip-man.patch
|
||||
Patch5: iproute2-movelib.patch
|
||||
Patch6: iproute2-tex.patch
|
||||
Patch7: iproute2-backwardcompat.patch
|
||||
Patch7: iproute2-2.6.25-aead.patch
|
||||
|
||||
License: GPLv2+
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -36,7 +36,7 @@ capabilities of the Linux 2.4.x and 2.6.x kernel.
|
||||
%patch5 -p1 -b .movelib
|
||||
#remove tex for the while
|
||||
#%patch6 -p1 -b .wotex
|
||||
%patch7 -p1 -b .backw
|
||||
%patch7 -p1 -b .aead
|
||||
|
||||
%build
|
||||
export LIBDIR=%{_libdir}
|
||||
@ -112,6 +112,11 @@ EOF
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/cbq/*
|
||||
|
||||
%changelog
|
||||
* Mon Apr 21 2008 Marcela Maslanova <mmaslano@redhat.com> - 2.6.25-1
|
||||
- update
|
||||
- remove patch for backward compatibility
|
||||
- add patch for AEAD compatibility
|
||||
|
||||
* Thu Feb 21 2008 Marcela Maslanova <mmaslano@redhat.com> - 2.6.23-4
|
||||
- add creating ps file again. Fix was done in texlive
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -up iproute-2.6.23/iproute2-2.6.23/lib/utils.c.ee iproute-2.6.23/iproute2-2.6.23/lib/utils.c
|
||||
--- iproute-2.6.23/iproute2-2.6.23/lib/utils.c.ee 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.23/iproute2-2.6.23/lib/utils.c 2007-10-31 09:26:20.000000000 +0100
|
||||
diff -up iproute-2.6.25/iproute2-2.6.25/lib/utils.c.ee iproute-2.6.25/iproute2-2.6.25/lib/utils.c
|
||||
--- iproute-2.6.25/iproute2-2.6.25/lib/utils.c.ee 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.25/iproute2-2.6.25/lib/utils.c 2007-10-31 09:26:20.000000000 +0100
|
||||
@@ -503,8 +503,8 @@ char *resolve_address(const char *addr,
|
||||
len = 4;
|
||||
}
|
||||
|
221
iproute2-2.6.25-aead.patch
Normal file
221
iproute2-2.6.25-aead.patch
Normal file
@ -0,0 +1,221 @@
|
||||
diff -up iproute-2.6.25/iproute2-2.6.25/include/linux/xfrm.h.aead iproute-2.6.25/iproute2-2.6.25/include/linux/xfrm.h
|
||||
--- iproute-2.6.25/iproute2-2.6.25/include/linux/xfrm.h.aead 2008-04-17 19:12:54.000000000 +0200
|
||||
+++ iproute-2.6.25/iproute2-2.6.25/include/linux/xfrm.h 2008-04-22 08:38:15.000000000 +0200
|
||||
@@ -277,7 +277,7 @@ enum xfrm_attr_type_t {
|
||||
XFRMA_LASTUSED,
|
||||
XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */
|
||||
XFRMA_MIGRATE,
|
||||
- XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */
|
||||
+ XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */
|
||||
__XFRMA_MAX
|
||||
|
||||
#define XFRMA_MAX (__XFRMA_MAX - 1)
|
||||
@@ -426,12 +426,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.25/iproute2-2.6.25/ip/ipxfrm.c.aead iproute-2.6.25/iproute2-2.6.25/ip/ipxfrm.c
|
||||
--- iproute-2.6.25/iproute2-2.6.25/ip/ipxfrm.c.aead 2008-04-17 19:12:54.000000000 +0200
|
||||
+++ iproute-2.6.25/iproute2-2.6.25/ip/ipxfrm.c 2008-04-21 14:40:16.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.25/iproute2-2.6.25/ip/xfrm_state.c.aead iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c
|
||||
--- iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c.aead 2008-04-17 19:12:54.000000000 +0200
|
||||
+++ iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c 2008-04-21 14:40:16.000000000 +0200
|
||||
@@ -88,8 +88,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));
|
||||
@@ -112,7 +114,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);
|
||||
@@ -152,7 +154,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;
|
||||
@@ -160,7 +162,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,6 +235,7 @@ static int xfrm_state_modify(int cmd, un
|
||||
char buf[RTA_BUF_SIZE];
|
||||
} req;
|
||||
char *idp = NULL;
|
||||
+ char *aeadop = NULL;
|
||||
char *ealgop = NULL;
|
||||
char *aalgop = NULL;
|
||||
char *calgop = NULL;
|
||||
@@ -316,20 +319,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);
|
||||
@@ -360,11 +374,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);
|
||||
@@ -417,7 +447,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));
|
@ -1,6 +1,6 @@
|
||||
diff -up iproute-2.6.23/iproute2-2.6.23/Makefile.old iproute-2.6.23/iproute2-2.6.23/Makefile
|
||||
--- iproute-2.6.23/iproute2-2.6.23/Makefile.old 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.23/iproute2-2.6.23/Makefile 2007-10-31 09:22:41.000000000 +0100
|
||||
diff -up iproute-2.6.25/iproute2-2.6.25/Makefile.old iproute-2.6.25/iproute2-2.6.25/Makefile
|
||||
--- iproute-2.6.25/iproute2-2.6.25/Makefile.old 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.25/iproute2-2.6.25/Makefile 2007-10-31 09:22:41.000000000 +0100
|
||||
@@ -3,6 +3,7 @@ SBINDIR=/usr/sbin
|
||||
CONFDIR=/etc/iproute2
|
||||
DOCDIR=/usr/share/doc/iproute2
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- iproute-2.6.23/iproute2-2.6.23/ip/iplink.c
|
||||
+++ iproute-2.6.23/iproute2-2.6.23/ip/iplink.c
|
||||
@@ -107,7 +107,8 @@ static int accept_msg(const struct sockaddr_nl *who,
|
||||
{
|
||||
struct nlmsgerr *err = (struct nlmsgerr *)NLMSG_DATA(n);
|
||||
|
||||
- if (n->nlmsg_type == NLMSG_ERROR && err->error == -EOPNOTSUPP)
|
||||
+ if (n->nlmsg_type == NLMSG_ERROR &&
|
||||
+ (err->error == -EOPNOTSUPP || err->error == -EINVAL))
|
||||
have_rtnl_newlink = 0;
|
||||
else
|
||||
have_rtnl_newlink = 1;
|
@ -1,6 +1,6 @@
|
||||
diff -up iproute-2.6.23/iproute2-2.6.23/netem/Makefile.lib iproute-2.6.23/iproute2-2.6.23/netem/Makefile
|
||||
--- iproute-2.6.23/iproute2-2.6.23/netem/Makefile.lib 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.23/iproute2-2.6.23/netem/Makefile 2007-10-31 09:31:07.000000000 +0100
|
||||
diff -up iproute-2.6.25/iproute2-2.6.25/netem/Makefile.lib iproute-2.6.25/iproute2-2.6.25/netem/Makefile
|
||||
--- iproute-2.6.25/iproute2-2.6.25/netem/Makefile.lib 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.25/iproute2-2.6.25/netem/Makefile 2007-10-31 09:31:07.000000000 +0100
|
||||
@@ -19,9 +19,9 @@ stats: stats.c
|
||||
$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
|
||||
|
||||
@ -13,9 +13,9 @@ diff -up iproute-2.6.23/iproute2-2.6.23/netem/Makefile.lib iproute-2.6.23/iprout
|
||||
done
|
||||
|
||||
clean:
|
||||
diff -up iproute-2.6.23/iproute2-2.6.23/tc/tc_util.c.lib iproute-2.6.23/iproute2-2.6.23/tc/tc_util.c
|
||||
--- iproute-2.6.23/iproute2-2.6.23/tc/tc_util.c.lib 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.23/iproute2-2.6.23/tc/tc_util.c 2007-10-31 09:33:00.000000000 +0100
|
||||
diff -up iproute-2.6.25/iproute2-2.6.25/tc/tc_util.c.lib iproute-2.6.25/iproute2-2.6.25/tc/tc_util.c
|
||||
--- iproute-2.6.25/iproute2-2.6.25/tc/tc_util.c.lib 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.25/iproute2-2.6.25/tc/tc_util.c 2007-10-31 09:33:00.000000000 +0100
|
||||
@@ -30,7 +30,7 @@ const char *get_tc_lib(void)
|
||||
|
||||
lib_dir = getenv("TC_LIB_DIR");
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -up iproute-2.6.23/iproute2-2.6.23/Makefile.ble iproute-2.6.23/iproute2-2.6.23/Makefile
|
||||
--- iproute-2.6.23/iproute2-2.6.23/Makefile.ble 2007-10-31 09:22:41.000000000 +0100
|
||||
+++ iproute-2.6.23/iproute2-2.6.23/Makefile 2007-10-31 09:24:09.000000000 +0100
|
||||
diff -up iproute-2.6.25/iproute2-2.6.25/Makefile.ble iproute-2.6.25/iproute2-2.6.25/Makefile
|
||||
--- iproute-2.6.25/iproute2-2.6.25/Makefile.ble 2007-10-31 09:22:41.000000000 +0100
|
||||
+++ iproute-2.6.25/iproute2-2.6.25/Makefile 2007-10-31 09:24:09.000000000 +0100
|
||||
@@ -22,7 +22,7 @@ ADDLIB+=ipx_ntop.o ipx_pton.o
|
||||
|
||||
CC = gcc
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up iproute-2.6.23/iproute2-2.6.23/Makefile.old iproute-2.6.23/iproute2-2.6.23/Makefile
|
||||
diff -up iproute-2.6.23/iproute2-2.6.23/doc/Makefile.old iproute-2.6.23/iproute2-2.6.23/doc/Makefile
|
||||
--- iproute-2.6.23/iproute2-2.6.23/doc/Makefile.old 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.23/iproute2-2.6.23/doc/Makefile 2008-02-06 13:22:59.000000000 +0100
|
||||
diff -up iproute-2.6.23/iproute2-2.6.25/Makefile.old iproute-2.6.23/iproute2-2.6.25/Makefile
|
||||
diff -up iproute-2.6.23/iproute2-2.6.25/doc/Makefile.old iproute-2.6.23/iproute2-2.6.25/doc/Makefile
|
||||
--- iproute-2.6.23/iproute2-2.6.25/doc/Makefile.old 2007-10-16 23:27:42.000000000 +0200
|
||||
+++ iproute-2.6.23/iproute2-2.6.25/doc/Makefile 2008-02-06 13:22:59.000000000 +0100
|
||||
@@ -1,55 +0,0 @@
|
||||
-PSFILES=ip-cref.ps ip-tunnels.ps api-ip6-flowlabels.ps ss.ps nstat.ps arpd.ps rtstat.ps
|
||||
-# tc-cref.ps
|
||||
|
Loading…
Reference in New Issue
Block a user