From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarek Poplawski Subject: Re: kernel mode pppoe ppp if + ifb + mirred redirect, ethernet packets in ifb?! Date: Wed, 14 Oct 2009 21:11:55 +0200 Message-ID: <20091014191155.GA3471@del.dom.local> References: <200910130144.04910.denys@visp.net.lb> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: hadi@cyberus.ca, netdev@vger.kernel.org To: Denys Fedoryschenko Return-path: Received: from mail-fx0-f227.google.com ([209.85.220.227]:62776 "EHLO mail-fx0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751941AbZJNTMj (ORCPT ); Wed, 14 Oct 2009 15:12:39 -0400 Received: by fxm27 with SMTP id 27so119536fxm.17 for ; Wed, 14 Oct 2009 12:12:01 -0700 (PDT) Content-Disposition: inline In-Reply-To: <200910130144.04910.denys@visp.net.lb> Sender: netdev-owner@vger.kernel.org List-ID: Denys Fedoryschenko wrote, On 10/13/2009 12:44 AM: ... > As i understand, for pppoe case, he can just skip offset for ethernet and > pppoe header, and he can filter by ip, or not? > Current way is maybe better, cause someone who want to count everything with > ethernet and pppoe headers - can, and who want without - also can (by setting > offset , just a bit more difficult. > > Like > /sbin/tc filter add dev eth1 protocol 0x8864 parent 2:0 prio 1 u32 \ > match u32 0x$IPREMOTE_HEX 0xffffffff at 24 flowid 2:$ID > (found in LARTC) Maybe I miss something, but generally (for IP, TCP etc. matches) it should work "as usual". I think you and those other users you quoted were mislead by that tcpdump on ifb. Probably in some configs you might needed this 'protocol 0x8864' or 'protocol all'. You should see it on ppp's tcpdump then, like yours: > PPPoE_146 ~ # tcpdump -ni ppp0 -e -vvv -s 1500 -c 4 > tcpdump: WARNING: > tcpdump: listening on ppp0, link-type LINUX_SLL (Linux cooked), capture size > 1500 bytes > 17:03:17.015598 Out ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 111, id Cheers, Jarek P.