Add support to ipg for newer kernels #71756 by Christoph M.
authorMike Frysinger <vapier@gentoo.org>
Tue, 4 Jan 2005 03:52:15 +0000 (03:52 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 4 Jan 2005 03:52:15 +0000 (03:52 +0000)
net-misc/iputils/ChangeLog
net-misc/iputils/Manifest
net-misc/iputils/files/021109-ipg-linux-2.6.patch [new file with mode: 0644]
net-misc/iputils/iputils-021109-r3.ebuild

index 6f5e2b2e5d290e67d0ae19d4f0f22def94d571fb..431cf3e544ea17c7da9b8c37cf92b631c2717989 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for net-misc/iputils
-# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.33 2004/10/07 00:47:06 lv Exp $
+# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.34 2005/01/04 03:52:15 vapier Exp $
+
+  03 Jan 2005; Mike Frysinger <vapier@gentoo.org>
+  +files/021109-ipg-linux-2.6.patch, iputils-021109-r3.ebuild:
+  Add support to ipg for newer kernels #71756 by Christoph M.
 
   06 Oct 2004; Travis Tilley <lv@gentoo.org>
   +files/iputils-021109-linux-udp-header.patch, iputils-021109-r3.ebuild:
index d016a573a44049042e706a82c34dcfb4b8aefe13..16dd33c41665dd1693425ce595757e0993f6a5ff 100644 (file)
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 a8cf19231cceaf80487680b01b7ad304 ChangeLog 4882
-MD5 bad79d640b481817ce5ca72801e18078 iputils-021109-r3.ebuild 2692
+MD5 e2ccbeed9ec09bab7f076ddf927b1eee ChangeLog 5062
+MD5 73b9d1d0fbd243c19f6ab07fb3c78e5e iputils-021109-r3.ebuild 2745
 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
 MD5 0a62fdeb93c761e5407fd3e185308a99 files/iputils-021109-pfkey.patch 3477
 MD5 c11c8762616b29e6d556a147aaa9374a files/021109-no-pfkey-search.patch 307
@@ -10,10 +10,11 @@ MD5 2baac2d4f1c8f01957aaaf6b6349c203 files/021109-gcc34.patch 347
 MD5 66a524e27160410a2dbaef8d2eed5365 files/digest-iputils-021109-r3 73
 MD5 b4615612d4514f12b35fbaf27d3e04fe files/iputils-20020927-no-ether_ntohost.patch 635
 MD5 79de65b9da536090d0560ba51520fd9d files/iputils-021109-linux-udp-header.patch 418
+MD5 c9986b4299c200260da8f025c5e4b0ea files/021109-ipg-linux-2.6.patch 981
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.9.10 (GNU/Linux)
 
-iD4DBQFB2hFyroRuSHgZdywRAl8rAJwPMx6wT0vztZGJTfAAEASYCKF63wCWO4m/
-4GYpXM96iLPAod2ySiNr+g==
-=+SLc
+iD8DBQFB2hMCroRuSHgZdywRAhQ2AKCRIC75RG7rORc0gnrFxcDikPSPdACfbA5L
+GO5EnD1VXVnmFQOv0wMff1g=
+=5IT7
 -----END PGP SIGNATURE-----
diff --git a/net-misc/iputils/files/021109-ipg-linux-2.6.patch b/net-misc/iputils/files/021109-ipg-linux-2.6.patch
new file mode 100644 (file)
index 0000000..550a8d5
--- /dev/null
@@ -0,0 +1,45 @@
+In newer kernels, the pg file has moved around in /proc/.
+
+http://bugs.gentoo.org/show_bug.cgi?id=71756
+
+--- iputils/ipg.orig   2005-01-03 22:47:26.314393976 -0500
++++ iputils/ipg        2005-01-03 22:49:09.686679000 -0500
+@@ -1,21 +1,31 @@
+-#! /bin/bash
++#!/bin/bash
+ 
+-modprobe pg3
++modprobe pg3 >& /dev/null
++modprobe pktgen >& /dev/null
++
++PGDEV=/proc/net/pg
++if [[ ! -e ${PGDEV} ]] ; then
++      PGDEV=/proc/net/pktgen/pg0
++      if [[ ! -e ${PGDEV} ]] ; then
++              echo "Couldn't not locate pg in /proc/net :("
++              exit 1
++      fi
++fi
+ 
+ function pgset() {
+     local result
+ 
+-    echo $1 > /proc/net/pg
++    echo $1 > ${PGDEV}
+ 
+-    result=`cat /proc/net/pg | fgrep "Result: OK:"`
++    result=`cat ${PGDEV} | fgrep "Result: OK:"`
+     if [ "$result" = "" ]; then
+-         cat /proc/net/pg | fgrep Result:
++         cat ${PGDEV} | fgrep Result:
+     fi
+ }
+ 
+ function pg() {
+-    echo inject > /proc/net/pg
+-    cat /proc/net/pg
++    echo inject > ${PGDEV}
++    cat ${PGDEV}
+ }
+ 
+ pgset "odev eth0"
index dc233582596aa3c86ebfc3f9bbb11850c01119d8..adbf10c124f53e85868bca67fd20d9b5cb1c30e4 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-021109-r3.ebuild,v 1.13 2004/12/08 01:00:59 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-021109-r3.ebuild,v 1.14 2005/01/04 03:52:15 vapier Exp $
 
 inherit flag-o-matic gnuconfig eutils toolchain-funcs
 
@@ -38,6 +38,7 @@ src_unpack() {
 
        epatch ${FILESDIR}/${PV}-gcc34.patch
        epatch ${FILESDIR}/${PV}-no-pfkey-search.patch
+       epatch ${FILESDIR}/${PV}-ipg-linux-2.6.patch #71756
 
        # make iputils work with newer glibc snapshots
        epatch ${FILESDIR}/${P}-linux-udp-header.patch