diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-01-04 03:52:15 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-01-04 03:52:15 +0000 |
commit | a7e5f41d694669569eda42646f9312d72a48472f (patch) | |
tree | 77aa752bd184f6c0735d36db61514b9235e9a740 /net-misc/iputils/files | |
parent | old (Manifest recommit) (diff) | |
download | gentoo-2-a7e5f41d694669569eda42646f9312d72a48472f.tar.gz gentoo-2-a7e5f41d694669569eda42646f9312d72a48472f.tar.bz2 gentoo-2-a7e5f41d694669569eda42646f9312d72a48472f.zip |
Add support to ipg for newer kernels #71756 by Christoph M.
Diffstat (limited to 'net-misc/iputils/files')
-rw-r--r-- | net-misc/iputils/files/021109-ipg-linux-2.6.patch | 45 |
1 files changed, 45 insertions, 0 deletions
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 index 000000000000..550a8d584c78 --- /dev/null +++ b/net-misc/iputils/files/021109-ipg-linux-2.6.patch @@ -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" |