Does `sys/net/radix.c` support non-contiguous masks?
Slawa Olhovchenkov
slw at zxy.spb.ru
Mon Jun 17 18:13:28 UTC 2019
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.
More information about the freebsd-hackers
mailing list