Hi,

While trying to troubleshoot a session problem, I've come
across session_table_get_or_alloc:
https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blob;f=src/vnet/session/session_lookup.c;h=4de6fdbe547499fcd256e387370cc5bf0c810206;hb=refs/heads/master#l158

To me it looks like this function could leave holes of invalid/wrong
table_indexes in the fib_index_to_table_index.

Index 0 is initialized explicitly (fib_index = 0), but the other indexes
are only initialized with a valid session table index when the first
session in that fib_index is opened.
When the first session happens to be in e.g. fib_index 10, all indexes from
1 up to including 9 are filled with zero (by vec_validate). The problem is
that for those fib indexes the session table index is now 0.
Fortunately, that session table index is valid, because it points to the
session table for fib_index 0. However, it also means that sessions from
the various fibs leak into each other.

Or do I miss something?

Regards
Andreas

-- 

Andreas Schultz

--
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16145): https://lists.fd.io/g/vpp-dev/message/16145
Mute This Topic: https://lists.fd.io/mt/73213863/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to