Commit
da786aac62d0c76811503cb11308cdc72923f944
by Pau Espin Pedrolipa: Try picking unused asp_id in AS to use as SLS
Initially (b93e1d01205cdd7bd7a65e15945f664f31fb4bcb), incoming traffic
from IPA sockets was tagged with SLS using the LSB of the socket file
descriptor. that did however not achieve sufficient entropy in real
world use cases.
Later on (2c9ba16c2c0210a189c72064eafad5ef336254cd), SLS tagging was
changed to pseudo-random generation.
Still it has been found too that it may create bad entropy under certain
condtions, with eg. havig only 2 incoming ASPs and both ending up with
the same asp_id/SLS, which won't allow for proper load sharing towards
other peers.
This commit changes the previous method by delaying SLS assignment
decision of the socket until the ASP becomes assigned to an AS
(basically during IPA handshake, when we receive IPA IDENTITY RESPONSE
with the Unit-Name, or when we receive the IPA IDENTITY ACK for it).
It is fine delaying SLS assignment to that point, since it's impossible
to receive any userplane data before that handhsake ocurrs.
Once the ASP is assigned to the AS (IPA ASPs can only be part of one
AS), we lookup the other ASPs in the AS to try to allocate an unused
4-bit asp_id which will end up being used as SLS.
Related: SYS#6543
Related: SYS#6802
Change-Id: I723eac25e59002630dca87a738c8eb7c62edec75