Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 2019 21:13:18 +0300
From:      Slawa Olhovchenkov <slw@zxy.spb.ru>
To:        Lev Serebryakov <lev@FreeBSD.org>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Does `sys/net/radix.c` support non-contiguous masks?
Message-ID:  <20190617181318.GJ47119@zxy.spb.ru>
In-Reply-To: <b42c0e0e-4948-2632-51fd-6374fba72c7c@FreeBSD.org>
References:  <b42c0e0e-4948-2632-51fd-6374fba72c7c@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 17, 2019 at 08:41:56PM +0300, Lev Serebryakov wrote:

> 
>  I'm trying to use `sys/net/radix.c` to store flow data (proto + src
> ip/port + dst ip/port) with non-contiguous masks (like "TCP from any
> address/port to 192.168.134.1"). I've written very simple prototype
> userland code [1] but it hangs in infinite loop on addition of second
> node (!).
> 
>  Is it supported?
> 
>  Could somebody look at code and say, what do I do wrong?

For use non-contiguous masks you need use 'Cecilia' 
algorithm by Paul Tsuchiya "A Search Algorithm for Table Entries with Non-contiguous Wildcarding"

https://pdfs.semanticscholar.org/9426/13f5634855a709bfecca296148bbd28810e7.pdf

be careful: not fully correct.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190617181318.GJ47119>