All of lore.kernel.org
 help / color / mirror / Atom feed
* a single rule that mach source ip or destination ip
@ 2010-09-05  6:13 Mamadou Touré
  2010-09-05  9:10 ` Jan Engelhardt
  0 siblings, 1 reply; 6+ messages in thread
From: Mamadou Touré @ 2010-09-05  6:13 UTC (permalink / raw)
  To: netfilter

Hi,
all is it possible to write a single rule that match source IP or
destination IP.
regards.

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

* Re: a single rule that mach source ip or destination ip
  2010-09-05  6:13 a single rule that mach source ip or destination ip Mamadou Touré
@ 2010-09-05  9:10 ` Jan Engelhardt
  2010-09-05  9:17   ` Brian Austin - Standard Universal
  2010-09-05 14:23   ` Pascal Hambourg
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Engelhardt @ 2010-09-05  9:10 UTC (permalink / raw)
  To: Mamadou Touré; +Cc: netfilter

On Sunday 2010-09-05 08:13, Mamadou Touré wrote:

>Hi,
>all is it possible to write a single rule that match source IP or
>destination IP.

It is possible.

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

* Re: a single rule that mach source ip or destination ip
  2010-09-05  9:10 ` Jan Engelhardt
@ 2010-09-05  9:17   ` Brian Austin - Standard Universal
  2010-09-05 14:23   ` Pascal Hambourg
  1 sibling, 0 replies; 6+ messages in thread
From: Brian Austin - Standard Universal @ 2010-09-05  9:17 UTC (permalink / raw)
  Cc: netfilter

  I think..

a | b == !a & !b

or was it

a | b == !(a&b)



On 5/09/2010 7:10 PM, Jan Engelhardt wrote:
> On Sunday 2010-09-05 08:13, Mamadou Touré wrote:
>
>> Hi,
>> all is it possible to write a single rule that match source IP or
>> destination IP.
> It is possible.
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: a single rule that mach source ip or destination ip
  2010-09-05  9:10 ` Jan Engelhardt
  2010-09-05  9:17   ` Brian Austin - Standard Universal
@ 2010-09-05 14:23   ` Pascal Hambourg
  2010-09-05 15:54     ` Jan Engelhardt
  1 sibling, 1 reply; 6+ messages in thread
From: Pascal Hambourg @ 2010-09-05 14:23 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Mamadou Touré, netfilter

Hello,

Jan Engelhardt a écrit :
> On Sunday 2010-09-05 08:13, Mamadou Touré wrote:
> 
>> all is it possible to write a single rule that match source IP or
>> destination IP.
> 
> It is possible.

With the "u32" match, I suppose ?

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

* Re: a single rule that mach source ip or destination ip
  2010-09-05 14:23   ` Pascal Hambourg
@ 2010-09-05 15:54     ` Jan Engelhardt
  2010-09-05 16:49       ` Mamadou Touré
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2010-09-05 15:54 UTC (permalink / raw)
  To: Pascal Hambourg; +Cc: Mamadou Touré, netfilter

>> 
>>> all is it possible to write a single rule that match source IP or
>>> destination IP.
>> 
>> It is possible.
>
>With the "u32" match, I suppose ?

Ah the language. A linguistic or/and is not the same as a logical 
OR/AND. Parenthesis are required in doubt.

It is possible to write a single rule that matches either src _or_ dst, 
_or_ both src addr and dst. Confusion complete!

u32 does not change that fact. Since rules themselves are ORed so to 
speak, there is few reason to do the same between matches (short of 
deeper match logic).
It is called disjunctive normal form.

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

* Re: a single rule that mach source ip or destination ip
  2010-09-05 15:54     ` Jan Engelhardt
@ 2010-09-05 16:49       ` Mamadou Touré
  0 siblings, 0 replies; 6+ messages in thread
From: Mamadou Touré @ 2010-09-05 16:49 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Pascal Hambourg, netfilter

hi,
all thank you for your help. can someone give me sample rule plz.
regards.

2010/9/5 Jan Engelhardt <jengelh@medozas.de>:
>>>
>>>> all is it possible to write a single rule that match source IP or
>>>> destination IP.
>>>
>>> It is possible.
>>
>>With the "u32" match, I suppose ?
>
> Ah the language. A linguistic or/and is not the same as a logical
> OR/AND. Parenthesis are required in doubt.
>
> It is possible to write a single rule that matches either src _or_ dst,
> _or_ both src addr and dst. Confusion complete!
>
> u32 does not change that fact. Since rules themselves are ORed so to
> speak, there is few reason to do the same between matches (short of
> deeper match logic).
> It is called disjunctive normal form.
>

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

end of thread, other threads:[~2010-09-05 16:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-05  6:13 a single rule that mach source ip or destination ip Mamadou Touré
2010-09-05  9:10 ` Jan Engelhardt
2010-09-05  9:17   ` Brian Austin - Standard Universal
2010-09-05 14:23   ` Pascal Hambourg
2010-09-05 15:54     ` Jan Engelhardt
2010-09-05 16:49       ` Mamadou Touré

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.