Hello,

The mask range works magically! Thank you very much!


zx
 
From: Alexander Zubkov
Date: 2025-12-09 03:11
To: zx@zxinc.org
CC: bird-users
Subject: Re: Writing filters that detect intersection between a prefix and a prefix set
Hello,

If you want to match any prefix that intersects (less or more specific) with some prefix of interest - you can use a prefix set like:
  define filter1 = [ 192.168.1.0/24{0,32}, 192.168.2.0/24{0,32} ];
I.e. you need to set the mask range from minimum to maximum - from 0 to 32.

Then you can accept or reject depending on the match result. For example:
  if net ~ filter1 then reject;

Regards,
Alexander

On Sat, Dec 6, 2025 at 6:42 AM zx@zxinc.org <zx@zxinc.org> wrote:
Hello,

I have a prefix set like [ 192.168.1.0/24+, 192.168.2.0/24+ ] and I want to write a filter that
filters all prefixes intersects with the prefix set and accepts all others, that is,

Anyone who knows how to write such a filter? Is it possible?

Thanks.

----
zx