1. 03 6月, 2014 1 次提交
    • E
      net: fix inet_getid() and ipv6_select_ident() bugs · 39c36094
      Eric Dumazet 提交于
      I noticed we were sending wrong IPv4 ID in TCP flows when MTU discovery
      is disabled.
      Note how GSO/TSO packets do not have monotonically incrementing ID.
      
      06:37:41.575531 IP (id 14227, proto: TCP (6), length: 4396)
      06:37:41.575534 IP (id 14272, proto: TCP (6), length: 65212)
      06:37:41.575544 IP (id 14312, proto: TCP (6), length: 57972)
      06:37:41.575678 IP (id 14317, proto: TCP (6), length: 7292)
      06:37:41.575683 IP (id 14361, proto: TCP (6), length: 63764)
      
      It appears I introduced this bug in linux-3.1.
      
      inet_getid() must return the old value of peer->ip_id_count,
      not the new one.
      
      Lets revert this part, and remove the prevention of
      a null identification field in IPv6 Fragment Extension Header,
      which is dubious and not even done properly.
      
      Fixes: 87c48fa3 ("ipv6: make fragment identifications less predictable")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39c36094
  2. 01 4月, 2014 1 次提交
    • 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
  3. 07 3月, 2014 1 次提交
  4. 01 9月, 2013 2 次提交
  5. 29 5月, 2013 1 次提交
  6. 16 11月, 2012 1 次提交