Clamp minLifetime() at INT_MAX
minLifetime() is used to determine a) whether an RA has expired and b)
the filter lifetime. Since large lifetimes are not particularly useful,
it can safely be clamped to INT_MAX, which may prevent some potential
problems with downcasting later on.
For instance, for values of mMinLifetime, where:
mMinLifetime > (FRACTION_OF_LIFETIME_TO_FILTER * INT_MAX)
The division and subsequent downcast of:
(int) (mMinLifetime / FRACTION_OF_LIFETIME_TO_FILTER)
could potentially result in a very small value, depending on the value
of FRACTION_OF_LIFETIME_TO_FILTER.
Test: TH
Bug: 299468654
Change-Id: I9e1cc142bc103e89c869387c2c36a0c57d9378a9
1 file changed