• H
    ipv6: strengthen fallback fragmentation id generation · 6dfac5c3
    Hannes Frederic Sowa 提交于
    First off, we don't need to check for non-NULL rt any more, as we are
    guaranteed to always get a valid rt6_info. Drop the check.
    
    In case we couldn't allocate an inet_peer for fragmentation information
    we currently generate strictly incrementing fragmentation ids for all
    destination. This is done to maximize the cycle and avoid collisions.
    
    Those fragmentation ids are very predictable. At least we should try to
    mix in the destination address.
    
    While it should make no difference to simply use a PRNG at this point,
    secure_ipv6_id ensures that we don't leak information from prandom,
    so its internal state could be recoverable.
    
    This fallback function should normally not get used thus this should
    not affect performance at all. It is just meant as a safety net.
    Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    6dfac5c3
output_core.c 2.8 KB