From: Patrick McHardy <kaber@trash.net>
To: Frithjof Hammer <mail@frithjof-hammer.de>
Cc: lartc@mailman.ds9a.nl, Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [LARTC] ifb and ppp
Date: Wed, 19 Sep 2007 15:04:54 +0200 [thread overview]
Message-ID: <46F11E76.8030202@trash.net> (raw)
In-Reply-To: <200709191417.43768.mail@frithjof-hammer.de>
[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]
Frithjof Hammer wrote:
> My goal is to setup an ingress traffic shaping on my PPPOE DSL line with ifb.
>
> My old imq stuff used iptables marks (like 'iptables -t mangle -A
> PREROUTING -p tcp --sport 22 -m length --length :500 -j MARK --set-mark 31')
> to classify the traffic and since i am lazy, i tried to to reuse them with
> ifb. But no luck: iptables marks the packets well, but tc doesn't see the
> marks on ifb0.
>
> May be my problem is somewhere between ppp0 and ifb0, so for a basic test, I
> tried this:
>
> tc qdisc add dev ppp0 ingress
> modprobe ifb
> ip link set up dev ifb0
> tc filter add dev ppp0 parent ffff: protocol ip prio 10 u32 \
> match u32 0 0 flowid 1:1 \
> action mirred egress redirect dev ifb0
>
> and run:
>
> root@router:/# tcpdump -i ifb0 -n
> tcpdump: WARNING: ifb0: no IPv4 address assigned
> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
> listening on ifb0, link-type EN10MB (Ethernet), capture size 96 bytes
> 12:38:29.584451 PPPoE [ses 0x7dc] IP 217.10.79.2.10000 > 84.189.95.184.1024:
> UDP, length 84
> 12:38:29.585924 PPPoE [ses 0x7dc] IP 84.189.5.17 > 84.189.95.184: GREv1, call
> 24388, seq 1868, ack 3210, length 205: compressed PPP data
> 12:38:29.600506 PPPoE [ses 0x7dc] IP truncated-ip - 256 bytes missing!
> 24.163.113.160.34247 > 84.189.95.184.9025: UDP, length 359
> [...]
>
> Looks like the packetes are still pppoe en-capsuled. Is this the correct
> behavior? This only occurs on ppp0, on other devices (like eth0) my iptables
> marks are matched by tc. What can I do to get my iptables marks working on
> ppp0 again?
Does this patch help?
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 365 bytes --]
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 5795789..7c80f16 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -83,6 +83,7 @@ static int tcf_mirred_init(struct rtattr *rta, struct rtattr *est,
case ARPHRD_IPGRE:
case ARPHRD_VOID:
case ARPHRD_NONE:
+ case ARPHRD_PPP:
ok_push = 0;
break;
default:
next parent reply other threads:[~2007-09-19 13:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200709191417.43768.mail@frithjof-hammer.de>
2007-09-19 13:04 ` Patrick McHardy [this message]
[not found] ` <200709192342.03646.mail@frithjof-hammer.de>
2007-09-20 11:55 ` [LARTC] ifb and ppp Patrick McHardy
2007-09-20 13:19 ` jamal
2007-09-20 14:00 ` Frithjof Hammer
2007-09-20 15:26 ` [LARTC] " Patrick McHardy
2007-09-21 11:23 ` jamal
2007-09-21 11:56 ` Patrick McHardy
2007-09-21 12:14 ` jamal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46F11E76.8030202@trash.net \
--to=kaber@trash.net \
--cc=lartc@mailman.ds9a.nl \
--cc=mail@frithjof-hammer.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).