summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-11-11 04:19:28 +0000
committerMike Frysinger <vapier@gentoo.org>2004-11-11 04:19:28 +0000
commit638a2626c55c0375bc8cb6eaf72daac6682ed668 (patch)
tree9904f19f97524ea0d359c3cbaf6439e85f286e37 /sys-apps/iproute2
parentarm KEYWORDS (diff)
downloadhistorical-638a2626c55c0375bc8cb6eaf72daac6682ed668.tar.gz
historical-638a2626c55c0375bc8cb6eaf72daac6682ed668.tar.bz2
historical-638a2626c55c0375bc8cb6eaf72daac6682ed668.zip
old
Diffstat (limited to 'sys-apps/iproute2')
-rw-r--r--sys-apps/iproute2/Manifest11
-rw-r--r--sys-apps/iproute2/files/2.4.7.20020116-htb.patch319
-rw-r--r--sys-apps/iproute2/files/2.4.7.20020116-local-exploit-fix.patch22
-rw-r--r--sys-apps/iproute2/files/2.4.7.20020116-misc-deb-fixes.patch34
-rw-r--r--sys-apps/iproute2/files/digest-iproute2-2.4.7.20020116-r12
-rw-r--r--sys-apps/iproute2/iproute2-2.4.7.20020116-r1.ebuild97
6 files changed, 3 insertions, 482 deletions
diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index b535d9042475..ee13465565db 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -3,14 +3,9 @@ Hash: SHA1
MD5 a04dd7c90c18842cd77d9d29ecd4a2d3 ChangeLog 6457
MD5 d0dad7daa0e6d356fc35f778fed36006 metadata.xml 225
-MD5 72f8396ece4332ba82d0dc4b1090c7db iproute2-2.4.7.20020116-r1.ebuild 2911
MD5 8d218ee880cd70a5c54ac099374a9677 iproute2-2.6.9.20040831.ebuild 1571
MD5 0c93c8279072ba9e3f42dd3d1374bd86 iproute2-2.6.7.20040608-r1.ebuild 2359
-MD5 ddd77e6d0215884a89ef5ad579945710 files/digest-iproute2-2.4.7.20020116-r1 169
-MD5 9977add19060fbeac6a3582ce8a5e098 files/2.4.7.20020116-htb.patch 9207
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
MD5 f9d5951d63104d862180994be31e96a2 files/digest-iproute2-2.6.9.20040831 75
MD5 d0071e387038661c76eefb2c8e6b5c46 files/2.6.7.20040608-misc-deb-fixes.patch 632
MD5 24a69d69fb222231a8d0f4358743190f files/2.6.7.20040608-misc-gentoo-fixes.patch 3970
@@ -19,7 +14,7 @@ MD5 e9826ddf5fac917b17fa8e25684d68ea files/2.6.9.20040831-make-install.patch 504
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.9.10 (GNU/Linux)
-iD8DBQFBVQ5DHTu7gpaalycRAn+sAJ93UHqY7L/foaWWxmNo16/4SzrxqwCcDoyX
-GlNPpBFXDGVppJh2mLGKHOU=
-=D+1M
+iD8DBQFBkuh9HTu7gpaalycRAvO0AJ4mEd67XNH/Xthy8KJ1JX493RssogCeJFSZ
+0H++DD2x6BrNJT58NX3h5Cw=
+=oFQ1
-----END PGP SIGNATURE-----
diff --git a/sys-apps/iproute2/files/2.4.7.20020116-htb.patch b/sys-apps/iproute2/files/2.4.7.20020116-htb.patch
deleted file mode 100644
index 1e4b591faf14..000000000000
--- a/sys-apps/iproute2/files/2.4.7.20020116-htb.patch
+++ /dev/null
@@ -1,319 +0,0 @@
---- iproute-20010824.orig/tc/Makefile
-+++ iproute-20010824/tc/Makefile
-@@ -25,6 +25,7 @@
- endif
-
- #TCMODULES += q_csz.o
-+TCMODULES += q_htb.o
- #TCMODULES += q_hpfq.o
- #TCMODULES += q_hfsc.o
-
---- iproute-20010824.orig/tc/q_htb.c
-+++ iproute-20010824/tc/q_htb.c
-@@ -0,0 +1,306 @@
-+/*
-+ * q_htb.c HTB.
-+ *
-+ * 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: Martin Devera, devik@cdi.cz
-+ *
-+ */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <syslog.h>
-+#include <fcntl.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+#include <string.h>
-+
-+#include "utils.h"
-+#include "tc_util.h"
-+
-+#define HTB_TC_VER 0x30003
-+#if HTB_TC_VER >> 16 != TC_HTB_PROTOVER
-+#error "Different kernel and TC HTB versions"
-+#endif
-+
-+static void explain(void)
-+{
-+ fprintf(stderr, "Usage: ... qdisc add ... htb [default N] [r2q N]\n"
-+ " default minor id of class to which unclassified packets are sent {0}\n"
-+ " r2q DRR quantums are computed as rate in Bps/r2q {10}\n"
-+ " debug string of 16 numbers each 0-3 {0}\n\n"
-+ "... class add ... htb rate R1 burst B1 [prio P] [slot S] [pslot PS]\n"
-+ " [ceil R2] [cburst B2] [mtu MTU] [quantum Q]\n"
-+ " rate rate allocated to this class (class can still borrow)\n"
-+ " burst max bytes burst which can be accumulated during idle period {computed}\n"
-+ " ceil definite upper class rate (no borrows) {rate}\n"
-+ " cburst burst but for ceil {computed}\n"
-+ " mtu max packet size we create rate map for {1600}\n"
-+ " prio priority of leaf; lower are served first {0}\n"
-+ " quantum how much bytes to serve from leaf at once {use r2q}\n"
-+ "\nTC HTB version %d.%d\n",HTB_TC_VER>>16,HTB_TC_VER&0xffff
-+ );
-+}
-+
-+static void explain1(char *arg)
-+{
-+ fprintf(stderr, "Illegal \"%s\"\n", arg);
-+ explain();
-+}
-+
-+
-+#define usage() return(-1)
-+
-+static int htb_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
-+{
-+ struct tc_htb_glob opt;
-+ struct rtattr *tail;
-+ unsigned i; char *p;
-+ memset(&opt,0,sizeof(opt));
-+ opt.rate2quantum = 10;
-+ opt.version = 3;
-+
-+ while (argc > 0) {
-+ if (matches(*argv, "r2q") == 0) {
-+ NEXT_ARG();
-+ if (get_u32(&opt.rate2quantum, *argv, 10)) {
-+ explain1("r2q"); return -1;
-+ }
-+ } else if (matches(*argv, "default") == 0) {
-+ NEXT_ARG();
-+ if (get_u32(&opt.defcls, *argv, 16)) {
-+ explain1("default"); return -1;
-+ }
-+ } else if (matches(*argv, "debug") == 0) {
-+ NEXT_ARG(); p = *argv;
-+ for (i=0; i<16; i++,p++) {
-+ if (*p<'0' || *p>'3') break;
-+ opt.debug |= (*p-'0')<<(2*i);
-+ }
-+ } else {
-+ fprintf(stderr, "What is \"%s\"?\n", *argv);
-+ explain();
-+ return -1;
-+ }
-+ argc--; argv++;
-+ }
-+ tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
-+ addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
-+ addattr_l(n, 2024, TCA_HTB_INIT, &opt, NLMSG_ALIGN(sizeof(opt)));
-+ tail->rta_len = (((void*)n)+NLMSG_ALIGN(n->nlmsg_len)) - (void*)tail;
-+ return 0;
-+}
-+
-+static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
-+{
-+ int ok=0;
-+ struct tc_htb_opt opt;
-+ __u32 rtab[256],ctab[256];
-+ unsigned buffer=0,cbuffer=0;
-+ int cell_log=-1,ccell_log = -1,mtu;
-+ struct rtattr *tail;
-+
-+ memset(&opt, 0, sizeof(opt)); mtu = 1600; /* eth packet len */
-+
-+ while (argc > 0) {
-+ if (matches(*argv, "prio") == 0) {
-+ NEXT_ARG();
-+ if (get_u32(&opt.prio, *argv, 10)) {
-+ explain1("prio"); return -1;
-+ }
-+ ok++;
-+ } else if (matches(*argv, "mtu") == 0) {
-+ NEXT_ARG();
-+ if (get_u32(&mtu, *argv, 10)) {
-+ explain1("mtu"); return -1;
-+ }
-+ } else if (matches(*argv, "quantum") == 0) {
-+ NEXT_ARG();
-+ if (get_u32(&opt.quantum, *argv, 10)) {
-+ explain1("quantum"); return -1;
-+ }
-+ } else if (matches(*argv, "burst") == 0 ||
-+ strcmp(*argv, "buffer") == 0 ||
-+ strcmp(*argv, "maxburst") == 0) {
-+ NEXT_ARG();
-+ if (get_size_and_cell(&buffer, &cell_log, *argv) < 0) {
-+ explain1("buffer");
-+ return -1;
-+ }
-+ ok++;
-+ } else if (matches(*argv, "cburst") == 0 ||
-+ strcmp(*argv, "cbuffer") == 0 ||
-+ strcmp(*argv, "cmaxburst") == 0) {
-+ NEXT_ARG();
-+ if (get_size_and_cell(&cbuffer, &ccell_log, *argv) < 0) {
-+ explain1("cbuffer");
-+ return -1;
-+ }
-+ ok++;
-+ } else if (strcmp(*argv, "ceil") == 0) {
-+ NEXT_ARG();
-+ if (opt.ceil.rate) {
-+ fprintf(stderr, "Double \"ceil\" spec\n");
-+ return -1;
-+ }
-+ if (get_rate(&opt.ceil.rate, *argv)) {
-+ explain1("ceil");
-+ return -1;
-+ }
-+ ok++;
-+ } else if (strcmp(*argv, "rate") == 0) {
-+ NEXT_ARG();
-+ if (opt.rate.rate) {
-+ fprintf(stderr, "Double \"rate\" spec\n");
-+ return -1;
-+ }
-+ if (get_rate(&opt.rate.rate, *argv)) {
-+ explain1("rate");
-+ return -1;
-+ }
-+ ok++;
-+ } else if (strcmp(*argv, "help") == 0) {
-+ explain();
-+ return -1;
-+ } else {
-+ fprintf(stderr, "What is \"%s\"?\n", *argv);
-+ explain();
-+ return -1;
-+ }
-+ argc--; argv++;
-+ }
-+
-+/* if (!ok)
-+ return 0;*/
-+
-+ if (opt.rate.rate == 0) {
-+ fprintf(stderr, "\"rate\" is required.\n");
-+ return -1;
-+ }
-+ /* if ceil params are missing, use the same as rate */
-+ if (!opt.ceil.rate) opt.ceil = opt.rate;
-+
-+ /* compute minimal allowed burst from rate; mtu is added here to make
-+ sute that buffer is larger than mtu and to have some safeguard space */
-+ if (!buffer) buffer = opt.rate.rate / HZ + mtu;
-+ if (!cbuffer) cbuffer = opt.ceil.rate / HZ + mtu;
-+
-+ if ((cell_log = tc_calc_rtable(opt.rate.rate, rtab, cell_log, mtu, 0)) < 0) {
-+ fprintf(stderr, "htb: failed to calculate rate table.\n");
-+ return -1;
-+ }
-+ opt.buffer = tc_calc_xmittime(opt.rate.rate, buffer);
-+ opt.rate.cell_log = cell_log;
-+
-+ if ((ccell_log = tc_calc_rtable(opt.ceil.rate, ctab, cell_log, mtu, 0)) < 0) {
-+ fprintf(stderr, "htb: failed to calculate ceil rate table.\n");
-+ return -1;
-+ }
-+ opt.cbuffer = tc_calc_xmittime(opt.ceil.rate, cbuffer);
-+ opt.ceil.cell_log = ccell_log;
-+
-+ tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
-+ addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
-+ addattr_l(n, 2024, TCA_HTB_PARMS, &opt, sizeof(opt));
-+ addattr_l(n, 3024, TCA_HTB_RTAB, rtab, 1024);
-+ addattr_l(n, 4024, TCA_HTB_CTAB, ctab, 1024);
-+ tail->rta_len = (((void*)n)+NLMSG_ALIGN(n->nlmsg_len)) - (void*)tail;
-+ return 0;
-+}
-+
-+static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
-+{
-+ struct rtattr *tb[TCA_HTB_RTAB+1];
-+ struct tc_htb_opt *hopt;
-+ struct tc_htb_glob *gopt;
-+ double buffer,cbuffer;
-+ SPRINT_BUF(b1);
-+ SPRINT_BUF(b2);
-+
-+ if (opt == NULL)
-+ return 0;
-+
-+ memset(tb, 0, sizeof(tb));
-+ parse_rtattr(tb, TCA_HTB_RTAB, RTA_DATA(opt), RTA_PAYLOAD(opt));
-+
-+ if (tb[TCA_HTB_PARMS]) {
-+
-+ hopt = RTA_DATA(tb[TCA_HTB_PARMS]);
-+ if (RTA_PAYLOAD(tb[TCA_HTB_PARMS]) < sizeof(*hopt)) return -1;
-+
-+ if (!hopt->level) {
-+ fprintf(f, "prio %d ", (int)hopt->prio);
-+ if (show_details)
-+ fprintf(f, "quantum %d ", (int)hopt->quantum);
-+ }
-+ fprintf(f, "rate %s ", sprint_rate(hopt->rate.rate, b1));
-+ buffer = ((double)hopt->rate.rate*tc_core_tick2usec(hopt->buffer))/1000000;
-+ fprintf(f, "ceil %s ", sprint_rate(hopt->ceil.rate, b1));
-+ cbuffer = ((double)hopt->ceil.rate*tc_core_tick2usec(hopt->cbuffer))/1000000;
-+ if (show_details) {
-+ fprintf(f, "burst %s/%u mpu %s ", sprint_size(buffer, b1),
-+ 1<<hopt->rate.cell_log, sprint_size(hopt->rate.mpu, b2));
-+ fprintf(f, "cburst %s/%u mpu %s ", sprint_size(cbuffer, b1),
-+ 1<<hopt->ceil.cell_log, sprint_size(hopt->ceil.mpu, b2));
-+ fprintf(f, "level %d ", (int)hopt->level);
-+ } else {
-+ fprintf(f, "burst %s ", sprint_size(buffer, b1));
-+ fprintf(f, "cburst %s ", sprint_size(cbuffer, b1));
-+ }
-+ if (show_raw)
-+ fprintf(f, "buffer [%08x] cbuffer [%08x] ",
-+ hopt->buffer,hopt->cbuffer);
-+ }
-+ if (tb[TCA_HTB_INIT]) {
-+ gopt = RTA_DATA(tb[TCA_HTB_INIT]);
-+ if (RTA_PAYLOAD(tb[TCA_HTB_INIT]) < sizeof(*gopt)) return -1;
-+
-+ fprintf(f, "r2q %d default %x direct_packets_stat %u",
-+ gopt->rate2quantum,gopt->defcls,gopt->direct_pkts);
-+ if (show_details)
-+ fprintf(f," ver %d.%d",gopt->version >> 16,gopt->version & 0xffff);
-+ }
-+ return 0;
-+}
-+
-+static int htb_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
-+{
-+ struct tc_htb_xstats *st;
-+ if (xstats == NULL)
-+ return 0;
-+
-+ if (RTA_PAYLOAD(xstats) < sizeof(*st))
-+ return -1;
-+
-+ st = RTA_DATA(xstats);
-+ fprintf(f, " lended: %u borrowed: %u giants: %u\n",
-+ st->lends,st->borrows,st->giants);
-+ fprintf(f, " tokens: %d ctokens: %d\n", st->tokens,st->ctokens);
-+ return 0;
-+}
-+
-+struct qdisc_util htb_util = {
-+ NULL,
-+ "htb",
-+ htb_parse_opt,
-+ htb_print_opt,
-+ htb_print_xstats,
-+ htb_parse_class_opt,
-+ htb_print_opt,
-+};
-+
-+/* for testing of old one */
-+struct qdisc_util htb2_util = {
-+ NULL,
-+ "htb2",
-+ htb_parse_opt,
-+ htb_print_opt,
-+ htb_print_xstats,
-+ htb_parse_class_opt,
-+ htb_print_opt,
-+};
diff --git a/sys-apps/iproute2/files/2.4.7.20020116-local-exploit-fix.patch b/sys-apps/iproute2/files/2.4.7.20020116-local-exploit-fix.patch
deleted file mode 100644
index bea31558be8b..000000000000
--- a/sys-apps/iproute2/files/2.4.7.20020116-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
-@@ -164,7 +164,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);
-@@ -272,7 +273,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/2.4.7.20020116-misc-deb-fixes.patch b/sys-apps/iproute2/files/2.4.7.20020116-misc-deb-fixes.patch
deleted file mode 100644
index 960cb760685c..000000000000
--- a/sys-apps/iproute2/files/2.4.7.20020116-misc-deb-fixes.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- iproute-20010824.orig/tc/tc_qdisc.c
-+++ iproute-20010824/tc/tc_qdisc.c
-@@ -245,7 +245,7 @@
- fprintf(fp, "\n");
- if (show_stats) {
- if (tb[TCA_STATS]) {
-- if (RTA_PAYLOAD(tb[TCA_STATS]) < sizeof(struct tc_stats))
-+ if (RTA_PAYLOAD(tb[TCA_STATS]) < offsetof(struct tc_stats,backlog)+sizeof(((struct tc_stats*)0)->backlog))
- fprintf(fp, "statistics truncated");
- else {
- struct tc_stats st;
---- iproute-20010824.orig/Makefile
-+++ iproute-20010824/Makefile
-@@ -35,7 +35,7 @@
-
- CC = gcc
- CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
--CFLAGS = $(CCOPTS) $(GLIBCFIX) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
-+CFLAGS = $(CCOPTS) -I../include $(GLIBCFIX) -I$(KERNEL_INCLUDE) $(DEFINES)
-
- LDLIBS += -L../lib -lnetlink -lutil
-
---- iproute-20010824.orig/include-glibc/glibc-bugs.h
-+++ iproute-20010824/include-glibc/glibc-bugs.h
-@@ -12,9 +12,6 @@
-
- #include <linux/types.h>
-
--typedef __u16 in_port_t;
--typedef __u32 in_addr_t;
--
- #endif
-
- #endif
diff --git a/sys-apps/iproute2/files/digest-iproute2-2.4.7.20020116-r1 b/sys-apps/iproute2/files/digest-iproute2-2.4.7.20020116-r1
deleted file mode 100644
index eb97e2505eb6..000000000000
--- a/sys-apps/iproute2/files/digest-iproute2-2.4.7.20020116-r1
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 2c7e5f3a10e703745ecdc613f7a7d187 iproute2-2.4.7-now-ss020116-try.tar.gz 197008
-MD5 31a096d8151e4d08f2d090b4c605dd8d iproute2-2.4.7.20020116-manpages.patch.bz2 28706
diff --git a/sys-apps/iproute2/iproute2-2.4.7.20020116-r1.ebuild b/sys-apps/iproute2/iproute2-2.4.7.20020116-r1.ebuild
deleted file mode 100644
index 1fc51b012160..000000000000
--- a/sys-apps/iproute2/iproute2-2.4.7.20020116-r1.ebuild
+++ /dev/null
@@ -1,97 +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.20020116-r1.ebuild,v 1.2 2004/09/15 21:29:45 vapier Exp $
-
-inherit eutils flag-o-matic
-
-# Deb patches have been stripped/updated from the 13 deb release
-SRCFILE="iproute2-2.4.7-now-ss020116-try.tar.gz"
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="http://www.worldbank.ro/ip-routing/"
-SRC_URI="http://ftp.iasi.roedu.net/mirrors/ftp.inr.ac.ru/ip-routing/${SRCFILE}
- ftp://ftp.inr.ac.ru/ip-routing/${SRCFILE}
- mirror://gentoo/${P}-manpages.patch.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="x86 ppc sparc mips alpha arm hppa amd64 ia64"
-IUSE="atm doc"
-
-RDEPEND="virtual/libc
- =sys-libs/db-1*
- atm? ( net-dialup/linux-atm )"
-DEPEND="${RDEPEND}
- >=virtual/os-headers-2.4.21
- >=sys-apps/sed-4
- doc? ( virtual/tetex )"
-
-S=${WORKDIR}/iproute2
-
-src_unpack() {
- unpack ${SRCFILE}
- cd ${S}
-
- # 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
-
- # Enable HTB scheduler (stripped from debian patch)
- epatch ${FILESDIR}/${PV}-htb.patch
- # Add a few debian fixes
- epatch ${FILESDIR}/${PV}-misc-deb-fixes.patch
- # Add manpages from debian
- epatch ${DISTDIR}/${P}-manpages.patch.bz2
-
- # Make sure we use glibc tcp.h instead of kernel tcp.h
- sed -i '/include/s:linux/tcp\.h:netinet/tcp.h:' misc/ss.c || die "sed ss.c failed"
-
- # 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
-
- # Fix db and glibc includes
- sed -i \
- -e "s:-O2:${CFLAGS}:g" \
- -e 's:-I\.\./include-glibc::g' \
- -e 's:db3:db1:g' \
- Makefile || die "sed Makefile failed"
- sed -i 's:-ldb:-ldb1:' misc/Makefile || die "sed misc/Makefile failed"
-
- # Enable diffserv/atm support
- if use atm ; then
- sed -i 's:=n$:=y:' Config || die "sed Config failed"
- fi
-}
-
-src_compile() {
- emake KERNEL_INCLUDE="${ROOT}/usr/include" || die
-}
-
-src_install() {
- into /
- cd ${S}/ip
- dosbin ifcfg ip routef routel rtmon rtpr || die "dosbin ip failed"
- cd ${S}/misc
- dosbin arpd ifstat nstat rtacct rtstat ss || die "dosbin misc failed"
- cd ${S}/tc
- dosbin tc || die "dosbin tc failed"
- cd ${S}
-
- doman debian/manpages/*
-
- 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
-}