diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-08-09 04:01:46 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-08-09 04:01:46 +0000 |
commit | 8741b1d1cd9a58e9d89bdb6548a8ff71c0ab1b2b (patch) | |
tree | 6ed7e5fbe5c461c87373c429dc62c186ce593931 /sys-apps/iproute2 | |
parent | hppa stable for #59692 (diff) | |
download | historical-8741b1d1cd9a58e9d89bdb6548a8ff71c0ab1b2b.tar.gz historical-8741b1d1cd9a58e9d89bdb6548a8ff71c0ab1b2b.tar.bz2 historical-8741b1d1cd9a58e9d89bdb6548a8ff71c0ab1b2b.zip |
kill older version
Diffstat (limited to 'sys-apps/iproute2')
-rw-r--r-- | sys-apps/iproute2/Manifest | 10 | ||||
-rw-r--r-- | sys-apps/iproute2/files/2.4.7.20010824-hfsc.patch | 416 | ||||
-rw-r--r-- | sys-apps/iproute2/files/2.4.7.20010824-local-exploit-fix.patch | 22 | ||||
-rw-r--r-- | sys-apps/iproute2/files/digest-iproute2-2.4.7.20010824-r5 | 2 | ||||
-rw-r--r-- | sys-apps/iproute2/iproute2-2.4.7.20010824-r5.ebuild | 90 |
5 files changed, 3 insertions, 537 deletions
diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest index 12045239a899..a829f9fab379 100644 --- a/sys-apps/iproute2/Manifest +++ b/sys-apps/iproute2/Manifest @@ -4,13 +4,9 @@ Hash: SHA1 MD5 e9dd3f20eead8945ac881bf6b8dd702f ChangeLog 5716 MD5 d0dad7daa0e6d356fc35f778fed36006 metadata.xml 225 MD5 6a887d6eb3bec8192691a6767688e840 iproute2-2.4.7.20020116.ebuild 2821 -MD5 7e8497b4b1384b22278c4eec2ad25249 iproute2-2.4.7.20010824-r5.ebuild 2717 MD5 65e08dd17660a9d29b989c688f657f7b iproute2-2.6.7.20040608.ebuild 2167 -MD5 6430380d9057802a2f24581b2e7e1b3d files/digest-iproute2-2.4.7.20010824-r5 150 MD5 ddd77e6d0215884a89ef5ad579945710 files/digest-iproute2-2.4.7.20020116 169 MD5 9977add19060fbeac6a3582ce8a5e098 files/2.4.7.20020116-htb.patch 9207 -MD5 7aa13dbeefb733697d49aa63e18d4110 files/2.4.7.20010824-hfsc.patch 9465 -MD5 d762a24b5c857658cc0a06432b122439 files/2.4.7.20010824-local-exploit-fix.patch 666 MD5 d3a321fa8b70eef6df11d7343a14fd02 files/2.4.7.20020116-hfsc.patch 9507 MD5 2d163d8622e69d17eb7ba73a61ffb51e files/2.4.7.20020116-local-exploit-fix.patch 666 MD5 249c1788ee3cc7a3d55dee871076a5a1 files/2.4.7.20020116-misc-deb-fixes.patch 977 @@ -20,7 +16,7 @@ MD5 24a69d69fb222231a8d0f4358743190f files/2.6.7.20040608-misc-gentoo-fixes.patc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.8 (GNU/Linux) -iD8DBQFBEG3kHTu7gpaalycRAiy6AKDK4gROBRUmg/UvtRqFGGW1Dvn1nACfQk3/ -kvaObYH8zNE6N78UB4kHVos= -=yB9S +iD8DBQFBFvdVHTu7gpaalycRAlIpAJ4887kOUKIXg+84MJm+j0R3oyaS6wCdFeag +fhFB62zd3IJM75WeDqckqw4= +=hJRj -----END PGP SIGNATURE----- diff --git a/sys-apps/iproute2/files/2.4.7.20010824-hfsc.patch b/sys-apps/iproute2/files/2.4.7.20010824-hfsc.patch deleted file mode 100644 index c36dd069c685..000000000000 --- a/sys-apps/iproute2/files/2.4.7.20010824-hfsc.patch +++ /dev/null @@ -1,416 +0,0 @@ -diff -urN a/tc/Makefile b/tc/Makefile ---- a/tc/Makefile 2000-04-16 19:42:53.000000000 +0200 -+++ b/tc/Makefile 2004-01-04 23:24:39.000000000 +0100 -@@ -26,7 +26,7 @@ - - #TCMODULES += q_csz.o - #TCMODULES += q_hpfq.o --#TCMODULES += q_hfsc.o -+TCMODULES += q_hfsc.o - - TCOBJ += $(TCMODULES) - -diff -urN a/tc/q_hfsc.c b/tc/q_hfsc.c ---- a/tc/q_hfsc.c 2000-04-16 19:42:54.000000000 +0200 -+++ b/tc/q_hfsc.c 2004-01-25 14:42:43.000000000 +0100 -@@ -1,12 +1,12 @@ - /* -- * q_hfsc.c HFSC. -+ * q_hfsc.c HFSC. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * -- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> -+ * Authors: Patrick McHardy, <kaber@trash.ner> - * - */ - -@@ -19,36 +19,247 @@ - #include <netinet/in.h> - #include <arpa/inet.h> - #include <string.h> -+#include <math.h> - - #include "utils.h" - #include "tc_util.h" - --static void explain() -+static int hfsc_get_sc(int *, char ***, struct tc_service_curve *); -+ -+ -+static void -+explain_qdisc(void) -+{ -+ fprintf(stderr, -+ "Usage: ... hfsc [ default CLASSID ]\n" -+ "\n" -+ " default: default class for unclassified packets\n" -+ ); -+} -+ -+static void -+explain_class(void) - { -- fprintf(stderr, "Usage: ... hfsc \n"); -+ fprintf(stderr, -+ "Usage: ... hfsc [ rt SC ] [ ls SC ] [ ul SC ]\n" -+ "\n" -+ "SC := [ [ m1 BPS ] [ d SEC ] m2 BPS\n" -+ "\n" -+ " m1 : slope of first segment\n" -+ " d : x-coordinate of intersection\n" -+ " m2 : slope of second segment\n" -+ "\n" -+ "Alternative format:\n" -+ "\n" -+ "SC := [ [ umax BYTE ] dmax SEC ] rate BPS\n" -+ "\n" -+ " umax : maximum unit of work\n" -+ " dmax : maximum delay\n" -+ " rate : rate\n" -+ "\n" -+ ); - } - --static void explain1(char *arg) -+static void -+explain1(char *arg) - { -- fprintf(stderr, "Illegal \"%s\"\n", arg); -+ fprintf(stderr, "HFSC: Illegal \"%s\"\n", arg); - } - -+static int -+hfsc_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) -+{ -+ struct tc_hfsc_qopt qopt; -+ -+ memset(&qopt, 0, sizeof(qopt)); -+ -+ while (argc > 0) { -+ if (matches(*argv, "default") == 0) { -+ NEXT_ARG(); -+ if (qopt.defcls != 0) { -+ fprintf(stderr, "HFSC: Double \"default\"\n"); -+ return -1; -+ } -+ if (get_u16(&qopt.defcls, *argv, 16) < 0) { -+ explain1("default"); -+ return -1; -+ } -+ } else if (matches(*argv, "help") == 0) { -+ explain_qdisc(); -+ return -1; -+ } else { -+ fprintf(stderr, "HFSC: What is \"%s\" ?\n", *argv); -+ explain_qdisc(); -+ return -1; -+ } -+ argc--, argv++; -+ } - --#define usage() return(-1) -+ addattr_l(n, 1024, TCA_OPTIONS, &qopt, sizeof(qopt)); -+ return 0; -+} - --static int hfsc_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) -+static int -+hfsc_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) - { -- return -1; -+ struct tc_hfsc_qopt *qopt; -+ -+ if (opt == NULL) -+ return 0; -+ if (RTA_PAYLOAD(opt) < sizeof(*qopt)) -+ return -1; -+ qopt = RTA_DATA(opt); -+ -+ if (qopt->defcls != 0) -+ fprintf(f, "default %x ", qopt->defcls); -+ -+ return 0; - } - --static int hfsc_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) -+static int -+hfsc_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats) - { -- return -1; -+ struct tc_hfsc_stats *st; -+ -+ if (xstats == NULL) -+ return 0; -+ if (RTA_PAYLOAD(xstats) < sizeof(*st)) -+ return -1; -+ st = RTA_DATA(xstats); -+ -+ fprintf(f, " period %u ", st->period); -+ if (st->work != 0) -+ fprintf(f, "work %llu bytes ", st->work); -+ if (st->rtwork != 0) -+ fprintf(f, "rtwork %llu bytes ", st->rtwork); -+ fprintf(f, "level %u ", st->level); -+ fprintf(f, "\n"); -+ -+ return 0; - } - --static int hfsc_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats) -+static int -+hfsc_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, -+ struct nlmsghdr *n) - { -- return -1; -+ struct tc_service_curve rsc, fsc, usc; -+ int rsc_ok, fsc_ok, usc_ok; -+ struct rtattr *tail; -+ -+ memset(&rsc, 0, sizeof(rsc)); -+ memset(&fsc, 0, sizeof(fsc)); -+ memset(&usc, 0, sizeof(usc)); -+ rsc_ok = fsc_ok = usc_ok = 0; -+ -+ while (argc > 0) { -+ if (matches(*argv, "rt") == 0) { -+ NEXT_ARG(); -+ if (hfsc_get_sc(&argc, &argv, &rsc) < 0) { -+ explain1("rt"); -+ return -1; -+ } -+ rsc_ok = 1; -+ } else if (matches(*argv, "ls") == 0) { -+ NEXT_ARG(); -+ if (hfsc_get_sc(&argc, &argv, &fsc) < 0) { -+ explain1("ls"); -+ return -1; -+ } -+ fsc_ok = 1; -+ } else if (matches(*argv, "ul") == 0) { -+ NEXT_ARG(); -+ if (hfsc_get_sc(&argc, &argv, &usc) < 0) { -+ explain1("ul"); -+ return -1; -+ } -+ usc_ok = 1; -+ } else if (matches(*argv, "help") == 0) { -+ explain_class(); -+ return -1; -+ } else { -+ fprintf(stderr, "HFSC: What is \"%s\" ?\n", *argv); -+ explain_class(); -+ return -1; -+ } -+ argc--, argv++; -+ } -+ -+ if (!(rsc_ok || fsc_ok || usc_ok)) { -+ fprintf(stderr, "HFSC: no parameters given\n"); -+ explain_class(); -+ return -1; -+ } -+ if (usc_ok && !fsc_ok) { -+ fprintf(stderr, "HFSC: Upper-limit Service Curve without " -+ "Link-Share Service Curve\n"); -+ explain_class(); -+ return -1; -+ } -+ -+ tail = (struct rtattr*)(((void*)n) + NLMSG_ALIGN(n->nlmsg_len)); -+ -+ addattr_l(n, 1024, TCA_OPTIONS, NULL, 0); -+ if (rsc_ok) -+ addattr_l(n, 1024, TCA_HFSC_RSC, &rsc, sizeof(rsc)); -+ if (fsc_ok) -+ addattr_l(n, 1024, TCA_HFSC_FSC, &fsc, sizeof(fsc)); -+ if (usc_ok) -+ addattr_l(n, 1024, TCA_HFSC_USC, &usc, sizeof(usc)); -+ -+ tail->rta_len = (((void*)n) + NLMSG_ALIGN(n->nlmsg_len)) - (void*)tail; -+ return 0; -+} -+ -+static void -+hfsc_print_sc(FILE *f, char *name, struct tc_service_curve *sc) -+{ -+ SPRINT_BUF(b1); -+ -+ fprintf(f, "%s ", name); -+ fprintf(f, "m1 %s ", sprint_rate(sc->m1, b1)); -+ fprintf(f, "d %s ", sprint_usecs(sc->d, b1)); -+ fprintf(f, "m2 %s ", sprint_rate(sc->m2, b1)); -+} -+ -+static int -+hfsc_print_class_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) -+{ -+ struct rtattr *tb[TCA_HFSC_MAX+1]; -+ struct tc_service_curve *rsc = NULL, *fsc = NULL, *usc = NULL; -+ -+ if (opt == NULL) -+ return 0; -+ -+ memset(tb, 0, sizeof(tb)); -+ parse_rtattr(tb, TCA_HFSC_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt)); -+ -+ if (tb[TCA_HFSC_RSC]) { -+ if (RTA_PAYLOAD(tb[TCA_HFSC_RSC]) < sizeof(*rsc)) -+ fprintf(stderr, "HFSC: truncated realtime option\n"); -+ else -+ rsc = RTA_DATA(tb[TCA_HFSC_RSC]); -+ } -+ if (tb[TCA_HFSC_FSC]) { -+ if (RTA_PAYLOAD(tb[TCA_HFSC_FSC]) < sizeof(*fsc)) -+ fprintf(stderr, "HFSC: truncated linkshare option\n"); -+ else -+ fsc = RTA_DATA(tb[TCA_HFSC_FSC]); -+ } -+ if (tb[TCA_HFSC_USC]) { -+ if (RTA_PAYLOAD(tb[TCA_HFSC_USC]) < sizeof(*usc)) -+ fprintf(stderr, "HFSC: truncated upperlimit option\n"); -+ else -+ usc = RTA_DATA(tb[TCA_HFSC_USC]); -+ } -+ -+ if (rsc != NULL) -+ hfsc_print_sc(f, "rt", rsc); -+ if (fsc != NULL) -+ hfsc_print_sc(f, "ls", fsc); -+ if (usc != NULL) -+ hfsc_print_sc(f, "ul", usc); -+ -+ return 0; - } - - struct qdisc_util hfsc_util = { -@@ -57,5 +268,126 @@ - hfsc_parse_opt, - hfsc_print_opt, - hfsc_print_xstats, -+ hfsc_parse_class_opt, -+ hfsc_print_class_opt, - }; - -+static int -+hfsc_get_sc1(int *argcp, char ***argvp, struct tc_service_curve *sc) -+{ -+ char **argv = *argvp; -+ int argc = *argcp; -+ unsigned int m1 = 0, d = 0, m2 = 0; -+ -+ if (matches(*argv, "m1") == 0) { -+ NEXT_ARG(); -+ if (get_rate(&m1, *argv) < 0) { -+ explain1("m1"); -+ return -1; -+ } -+ NEXT_ARG(); -+ } -+ -+ if (matches(*argv, "d") == 0) { -+ NEXT_ARG(); -+ if (get_usecs(&d, *argv) < 0) { -+ explain1("d"); -+ return -1; -+ } -+ NEXT_ARG(); -+ } -+ -+ if (matches(*argv, "m2") == 0) { -+ NEXT_ARG(); -+ if (get_rate(&m2, *argv) < 0) { -+ explain1("m2"); -+ return -1; -+ } -+ } else -+ return -1; -+ -+ sc->m1 = m1; -+ sc->d = d; -+ sc->m2 = m2; -+ -+ *argvp = argv; -+ *argcp = argc; -+ return 0; -+} -+ -+static int -+hfsc_get_sc2(int *argcp, char ***argvp, struct tc_service_curve *sc) -+{ -+ char **argv = *argvp; -+ int argc = *argcp; -+ unsigned int umax = 0, dmax = 0, rate = 0; -+ -+ if (matches(*argv, "umax") == 0) { -+ NEXT_ARG(); -+ if (get_size(&umax, *argv) < 0) { -+ explain1("umax"); -+ return -1; -+ } -+ NEXT_ARG(); -+ } -+ -+ if (matches(*argv, "dmax") == 0) { -+ NEXT_ARG(); -+ if (get_usecs(&dmax, *argv) < 0) { -+ explain1("dmax"); -+ return -1; -+ } -+ NEXT_ARG(); -+ } -+ -+ if (matches(*argv, "rate") == 0) { -+ NEXT_ARG(); -+ if (get_rate(&rate, *argv) < 0) { -+ explain1("rate"); -+ return -1; -+ } -+ } else -+ return -1; -+ -+ if (umax != 0 && dmax == 0) { -+ fprintf(stderr, "HFSC: umax given but dmax is zero.\n"); -+ return -1; -+ } -+ -+ if (dmax != 0 && ceil(umax * 1000000.0 / dmax) > rate) { -+ /* -+ * concave curve, slope of first segment is umax/dmax, -+ * intersection is at dmax -+ */ -+ sc->m1 = ceil(umax * 1000000.0 / dmax); /* in bps */ -+ sc->d = dmax; -+ sc->m2 = rate; -+ } else { -+ /* -+ * convex curve, slope of first segment is 0, intersection -+ * is at dmax - umax / rate -+ */ -+ sc->m1 = 0; -+ sc->d = ceil(dmax - umax * 1000000.0 / rate); /* in usec */ -+ sc->m2 = rate; -+ } -+ -+ *argvp = argv; -+ *argcp = argc; -+ return 0; -+} -+ -+static int -+hfsc_get_sc(int *argcp, char ***argvp, struct tc_service_curve *sc) -+{ -+ if (hfsc_get_sc1(argcp, argvp, sc) < 0 && -+ hfsc_get_sc2(argcp, argvp, sc) < 0) -+ return -1; -+ -+ if (sc->m1 == 0 && sc->m2 == 0) { -+ fprintf(stderr, "HFSC: Service Curve has two zero slopes\n"); -+ return -1; -+ } -+ -+ return 0; -+} diff --git a/sys-apps/iproute2/files/2.4.7.20010824-local-exploit-fix.patch b/sys-apps/iproute2/files/2.4.7.20010824-local-exploit-fix.patch deleted file mode 100644 index c66b9cbdc99c..000000000000 --- a/sys-apps/iproute2/files/2.4.7.20010824-local-exploit-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- iproute2/lib/libnetlink.c.orig 2003-08-10 15:02:10.000000000 +1000 -+++ iproute2/lib/libnetlink.c 2003-10-13 19:36:41.000000000 +1000 -@@ -169,7 +169,8 @@ - while (NLMSG_OK(h, status)) { - int err; - -- if (h->nlmsg_pid != rth->local.nl_pid || -+ if (nladdr.nl_pid != 0 || -+ h->nlmsg_pid != rth->local.nl_pid || - h->nlmsg_seq != rth->dump) { - if (junk) { - err = junk(&nladdr, h, arg2); -@@ -277,7 +278,8 @@ - exit(1); - } - -- if (h->nlmsg_pid != rtnl->local.nl_pid || -+ if (nladdr.nl_pid != peer || -+ h->nlmsg_pid != rtnl->local.nl_pid || - h->nlmsg_seq != seq) { - if (junk) { - err = junk(&nladdr, h, jarg); diff --git a/sys-apps/iproute2/files/digest-iproute2-2.4.7.20010824-r5 b/sys-apps/iproute2/files/digest-iproute2-2.4.7.20010824-r5 deleted file mode 100644 index 0019edbd44cc..000000000000 --- a/sys-apps/iproute2/files/digest-iproute2-2.4.7.20010824-r5 +++ /dev/null @@ -1,2 +0,0 @@ -MD5 b05a4e375d9468be3a1dd3f0e83daee8 iproute2-2.4.7-now-ss010824.tar.gz 140139 -MD5 60585e8f7d11173ca80591cc9f5fb833 iproute_20010824-13.diff.gz 91751 diff --git a/sys-apps/iproute2/iproute2-2.4.7.20010824-r5.ebuild b/sys-apps/iproute2/iproute2-2.4.7.20010824-r5.ebuild deleted file mode 100644 index 854dbe78764a..000000000000 --- a/sys-apps/iproute2/iproute2-2.4.7.20010824-r5.ebuild +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.4.7.20010824-r5.ebuild,v 1.3 2004/06/30 02:43:13 vapier Exp $ - -inherit eutils flag-o-matic - -DEBIANPATCH="iproute_20010824-13.diff.gz" -SRCFILE="iproute2-2.4.7-now-ss010824.tar.gz" - -DESCRIPTION="kernel routing and traffic control utilities" -HOMEPAGE="http://www.worldbank.ro/ip-routing/" -SRC_URI="ftp://ftp.inr.ac.ru/ip-routing/${SRCFILE} - mirror://debian/pool/main/i/iproute/${DEBIANPATCH}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="x86 ppc sparc mips alpha hppa amd64 ia64" -IUSE="doc" - -DEPEND=">=virtual/os-headers-2.4.21 - >=sys-apps/sed-4 - doc? ( virtual/tetex )" -RDEPEND="virtual/libc" - -S=${WORKDIR}/iproute2 - -src_unpack() { - unpack ${SRCFILE} - cd ${S} - - # Our patch does two things for us; First, it syncs up with Debian's - # iproute 20010824-9 package; Secondly, it adds htb3 support. The Debian - # patch tweaks the iproute compile so that we use an included pkt_sched.h - # header rather than looking at the one in /usr/src/linux/include/linux. - # This allows us to always enable HTB3 without compile problems; - epatch ${DISTDIR}/${DEBIANPATCH} - - # Enable HFSC scheduler #45274 - if [ ! -z "`grep tc_service_curve ${ROOT}/usr/include/linux/pkt_sched.h`" ] ; then - epatch ${FILESDIR}/${PV}-hfsc.patch - else - ewarn "Your linux-headers in /usr/include/linux are too old to" - ewarn "support the HFSC scheduler. It has been disabled." - fi - rm include/linux/pkt_sched.h - - # Now a little hack to handle kernel headers and stupid defines ... - echo '#define __constant_htons(x) htons(x)' >> include-glibc/glibc-bugs.h - append-flags -D_LINUX_BYTEORDER_LITTLE_ENDIAN_H -D_LINUX_BYTEORDER_BIG_ENDIAN_H - - # Fix local DoS exploit #34294 - epatch ${FILESDIR}/${PV}-local-exploit-fix.patch - - sed -i \ - -e "s:-O2:${CFLAGS}:g" \ - -e "s:-Werror::g" \ - -e "s:-I../include-glibc::g" \ - Makefile || die "sed Makefile failed" - - # this next thing is required to enable diffserv - # (ATM support doesn't compile right now) - sed -i \ - -e 's:DIFFSERV=n:DIFFSERV=y:g' \ - -e 's:ATM=y:ATM=n:g' \ - Config || die "sed Config failed" -} - -src_compile() { - emake KERNEL_INCLUDE=/usr/include || die -} - -src_install() { - into / - cd ${S}/ip - dosbin ifcfg ip routef routel rtacct rtmon rtpr || die "dosbin * failed" - cd ${S}/tc - dosbin tc || die "dosbin tc failed" - cd ${S} - - doman debian/manpages/*.[1-9] - - dodoc README* RELNOTES - docinto examples ; dodoc examples/* - docinto examples/diffserv ; dodoc examples/diffserv/* - dodir /etc/iproute2 - insinto /etc/iproute2 ; doins ${S}/etc/iproute2/* - if use doc && [ -n "`ls doc/*.ps`" ] ; then - docinto ps ; dodoc doc/*.ps - fi -} |