From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Soltys Date: Tue, 18 Sep 2007 08:44:42 +0000 Subject: Re: [LARTC] I'm having an issue with u32 masking Message-Id: <46EF8FFA.6070707@ziu.info> List-Id: References: <46EF6840.90305@vadtec.net> In-Reply-To: <46EF6840.90305@vadtec.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Vadtec wrote: > Is this how tc is supposed to work? Does it only match on the value it > is given based on whether or not the mask matches? IE: u16 0x1a00 0x1a0f > at 22 (dest port 6656 ONLY), u16 0x1a0b 0x1a0f at 22 (dest port 6667 ONLY) > > If so, how can you match a range of ports (in my example, or a range of > anything for that matter) in tc? > Try: match u16 0x1a00 0xfff0 Mask is first applied to the value in the packet, then it's tested against your (0x1a00) value. _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc