All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Inverting filters
@ 2004-11-03  9:46 Nikolay Dmitriev
  2004-11-04 15:42 ` Andy Furniss
  0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Dmitriev @ 2004-11-03  9:46 UTC (permalink / raw)
  To: lartc

How to invert match parameter?

Like this:

tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
    match ip src 10.20.30.40 \
    match ip dst !10.30.0/24 \
    match ip dst !10.40.0/24 \
    flowid 1:20

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] Inverting filters
  2004-11-03  9:46 [LARTC] Inverting filters Nikolay Dmitriev
@ 2004-11-04 15:42 ` Andy Furniss
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Furniss @ 2004-11-04 15:42 UTC (permalink / raw)
  To: lartc

Nikolay Dmitriev wrote:
> How to invert match parameter?
> 
> Like this:
> 
> tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
>     match ip src 10.20.30.40 \
>     match ip dst !10.30.0/24 \
>     match ip dst !10.40.0/24 \
>     flowid 1:20

I'm not sure - but ISTR failing to invert u32 some time ago. Generally 
iptables would like a space round the ! - but I don't think it helps u32.

Maybe you could do it with bit masks.

Andy.


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-04 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-03  9:46 [LARTC] Inverting filters Nikolay Dmitriev
2004-11-04 15:42 ` Andy Furniss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.