Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 310524 Details for
Bug 453291
Filters for tc and netem can no longer be defined
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Shell script to trigger the problem.
filttest.sh (text/plain), 4.32 KB, created by
Karl Auerbach
on 2008-06-29 00:21:57 UTC
(
hide
)
Description:
Shell script to trigger the problem.
Filename:
MIME Type:
Creator:
Karl Auerbach
Created:
2008-06-29 00:21:57 UTC
Size:
4.32 KB
patch
obsolete
>#!/bin/sh > >if [ -z "$1" ] ; then > echo "Usage: $0 interface-name" > exit 1 >fi > >IFACE=$1 > >OUR_ID=`id -u` >if [ ${OUR_ID} != 0 ] ; then > echo This script must be run as root. > exit 1 >fi > >echo "Using interface ${IFACE}" > >echo "" >echo "Loading modules." >echo "modprobe sch_netem" >modprobe sch_netem >echo "modprobe cls_u32" >modprobe cls_u32 > >echo "" >echo "When there there is no pre-existing item you may get the following:" >echo "RTNETLINK answers: No such file or directory" >echo "But 'We have an error talking to the kernel' is bad." >echo "" > >echo "" >echo "Clear out everything" >echo tc qdisc del dev ${IFACE} root >tc qdisc del dev ${IFACE} root >echo tc qdisc del dev ${IFACE} ingress >tc qdisc del dev ${IFACE} ingress > >echo "" >echo "Create some nearly vacuous netem settings.." >echo "tc qdisc add dev ${IFACE} root handle 1: prio bands 5 priomap 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4" >tc qdisc add dev ${IFACE} root handle 1: prio bands 5 priomap 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 >echo "tc qdisc add dev ${IFACE} parent 1:1 handle 10: netem" >tc qdisc add dev ${IFACE} parent 1:1 handle 10: netem >echo "tc qdisc add dev ${IFACE} parent 1:2 handle 20: netem" >tc qdisc add dev ${IFACE} parent 1:2 handle 20: netem >echo "tc qdisc add dev ${IFACE} parent 1:3 handle 30: netem" >tc qdisc add dev ${IFACE} parent 1:3 handle 30: netem >echo "tc qdisc add dev ${IFACE} parent 1:4 handle 40: netem" >tc qdisc add dev ${IFACE} parent 1:4 handle 40: netem >echo "tc qdisc add dev ${IFACE} parent 1:5 handle 50: netem" >tc qdisc add dev ${IFACE} parent 1:5 handle 50: netem > >echo "" >echo "Clean out any previous filters" >tc filter del dev eth1 prio 3 >RC=$? >if [ ${RC} != 0 ]; then > echo "********************" > echo "* ERROR OCCURRED *" > echo "********************" >fi > >echo "" >echo "Create classifier root:" >echo "tc filter add dev ${IFACE} parent 1:0 prio 3 protocol ip u32" >tc filter add dev ${IFACE} parent 1:0 prio 3 protocol ip u32 >RC=$? >if [ ${RC} != 0 ]; then > echo "********************" > echo "* ERROR OCCURRED *" > echo "********************" >fi > >echo "" >echo "Generate one item hash table:" >echo "tc filter add dev ${IFACE} parent 1:0 prio 3 handle 2: u32 divisor 1" >tc filter add dev ${IFACE} parent 1:0 prio 3 handle 2: u32 divisor 1 >RC=$? >if [ ${RC} != 0 ]; then > echo "********************" > echo "* ERROR OCCURRED *" > echo "********************" >fi > >echo "" >echo "Generate a filter for IP" >echo "tc filter add dev ${IFACE} parent 1:0 handle ::1 prio 3 u32 match u8 0x40 0xF0 at 0 offset mask 0x0F00 at 0 shift 6 plus 0 ht 800:: link 2:" >tc filter add dev ${IFACE} parent 1:0 handle ::1 prio 3 u32 match u8 0x40 0xF0 at 0 offset mask 0x0F00 at 0 shift 6 plus 0 ht 800:: link 2: >RC=$? >if [ ${RC} != 0 ]; then > echo "********************" > echo "* ERROR OCCURRED *" > echo "********************" >fi > >echo "" >echo "Generate a filter for ICMP" >echo "tc filter add dev ${IFACE} protocol ip parent 1:0 prio 3 u32 match u8 0x01 0xff at 9 flowid 1:1 ht 2:0:" >tc filter add dev ${IFACE} protocol ip parent 1:0 prio 3 u32 match u8 0x01 0xff at 9 flowid 1:1 ht 2:0: >RC=$? >if [ ${RC} != 0 ]; then > echo "********************" > echo "* ERROR OCCURRED *" > echo "********************" >fi > >REAL_OUT=`mktemp -t real_output.XXXXXXXXXX` >SHOULD_BE_OUT=`mktemp -t should_be_output.XXXXXXXXXX` > >cat - >> ${SHOULD_BE_OUT} <<EOF >filter parent 1: protocol ip pref 3 u32 >filter parent 1: protocol ip pref 3 u32 fh 2: ht divisor 1 >filter parent 1: protocol ip pref 3 u32 fh 2::800 order 2048 key ht 2 bkt 0 flowid 1:1 > match 00010000/00ff0000 at 8 >filter parent 1: protocol ip pref 3 u32 fh 800: ht divisor 1 >filter parent 1: protocol ip pref 3 u32 fh 800::1 order 1 key ht 800 bkt 0 link 2: > match 40000000/f0000000 at 0 > offset 0f00>>6 at 0 >EOF > >tc filter show dev ${IFACE} >> ${REAL_OUT} > >echo "" >echo "The final result should be:" >cat ${SHOULD_BE_OUT} > >echo "" >echo "The actual result we got was:" >cat ${REAL_OUT} > >cmp ${SHOULD_BE_OUT} ${REAL_OUT} >if [ $? != 0 ]; then > echo "" > echo "*************************************" > echo "* Output was not what was expected! *" > echo "* *" > echo "* Differences are shown below. *" > echo "*************************************" > echo "" > diff -c ${SHOULD_BE_OUT} ${REAL_OUT} >else > echo "" > echo "The actual result matched the expected result." > echo "" >fi > >rm -f ${REAL_OUT} >rm -f ${SHOULD_BE_OUT}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 453291
: 310524 |
310957
|
310958