1. 02 11月, 2008 2 次提交
    • E
      udp: add a missing smp_wmb() in udp_lib_get_port() · c37ccc0d
      Eric Dumazet 提交于
      Corey Minyard spotted a missing memory barrier in udp_lib_get_port()
      
      We need to make sure a reader cannot read the new 'sk->sk_next' value
      and previous value of 'sk->sk_hash'. Or else, an item could be deleted
      from a chain, and inserted into another chain. If new chain was empty
      before the move, 'next' pointer is NULL, and lockless reader can
      not detect it missed following items in original chain.
      
      This patch is temporary, since we expect an upcoming patch
      to introduce another way of handling the problem.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c37ccc0d
    • N
      xfrm6: handling fragment · 7e3a42a1
      Nicolas Dichtel 提交于
      RFC4301 Section 7.1 says:
      
      "7.1.  Tunnel Mode SAs that Carry Initial and Non-Initial Fragments
      
           All implementations MUST support tunnel mode SAs that are configured
           to pass traffic without regard to port field (or ICMP type/code or
           Mobility Header type) values.  If the SA will carry traffic for
           specified protocols, the selector set for the SA MUST specify the
           port fields (or ICMP type/code or Mobility Header type) as ANY.  An
           SA defined in this fashion will carry all traffic including initial
           and non-initial fragments for the indicated Local/Remote addresses
           and specified Next Layer protocol(s)."
      
      But for IPv6, fragment is treated as a protocol.  This change catches
      protocol transported in fragmented packet.  In IPv4, there is no
      problem.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e3a42a1
  2. 01 11月, 2008 38 次提交