Fix long-standing issue with incorrect radix mask calculation.
Usual symptoms are messages like
rn_delete: inconsistent annotation
rn_addmask: mask impossibly already in tree
or inability to flush/delete particular prefix in ipfw table.
Changes:
- Assume 32 bytes as maximum radix key length
- Remove rn_init()
- Statically allocate rn_ones/rn_zeroes
- Make separate mask tree for each "normal" tree instead of system global one
- Remove "optimization" on masks reusage and key zeroying
- Change rn_addmask() arguments to accept tree pointer (no users in base)
PR: kern/182851, kern/169206, kern/135476, kern/134531
Found by: Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after: 2 weeks
Reviewed by: glebius
Sponsored by: Yandex LLC