netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: mstian88 <mstian88@163.com>
To: "Ben Hutchings" <ben@decadent.org.uk>
Cc: bwh@kernel.org, netdev@vger.kernel.org
Subject: Re:Re: How to set the filtering rules for drop the packets
Date: Tue, 22 Apr 2014 12:56:58 +0800 (CST)	[thread overview]
Message-ID: <6a2bd57e.18e1d.14587cb4cea.Coremail.mstian88@163.com> (raw)
In-Reply-To: <1398080944.3624.99.camel@deadeye.wl.decadent.org.uk>

thanks for your reply , 

 my NIC is intel X540-T1, when i set dst-port filter first ,suceess, but then set src-port filter failed。

That is to say the filter rule src-port and dis-port can't set together。

There are any other ways to filter the packets that srcport is 80 or dstport is 80?
                                              
                                                                                                                 monney
At 2014-04-21 19:49:04,"Ben Hutchings" <ben@decadent.org.uk> wrote:
>On Mon, 2014-04-21 at 17:54 +0800, mstian88 wrote:
>> Dear Ben Hutchings.
>> 
>> 
>> I want to discard the packets (srcport==80  or dstport==80),  how can
>> i do?
>>
>> eg.
>> I set the rule for discard the packets that src port is 80:
>> ethtool -U eth0 flow-type tcp4 src-port 80 action -1    Success
>> 
>> 
>> then set the rule for discard the packets that dst port is 80:
>> ethtool -U eth0 flow-type tcp4 dst-port 80 action -1    Failed
>> the error info is :
>> rmgr: Cannot insert RX class rule: Invalid argument
>
>The sets of fields you can filter by vary greatly between different
>drivers and network controllers.  It looks like the driver for eth0 just
>doesn't support filtering by dst-port only.
>
>Ben.
>
>
>-- 
>Ben Hutchings
>Knowledge is power.  France is bacon.

  reply	other threads:[~2014-04-22  5:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <35e52a86.138f1.14583b52f31.Coremail.mstian88@163.com>
2014-04-21 11:49 ` How to set the filtering rules for drop the packets Ben Hutchings
2014-04-22  4:56   ` mstian88 [this message]
2014-04-22 18:05     ` Ben Hutchings

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=6a2bd57e.18e1d.14587cb4cea.Coremail.mstian88@163.com \
    --to=mstian88@163.com \
    --cc=ben@decadent.org.uk \
    --cc=bwh@kernel.org \
    --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).