1. 21 5月, 2014 1 次提交
  2. 17 5月, 2014 1 次提交
    • T
      ipv4: ip_tunnels: disable cache for nbma gre tunnels · 22fb22ea
      Timo Teräs 提交于
      The connected check fails to check for ip_gre nbma mode tunnels
      properly. ip_gre creates temporary tnl_params with daddr specified
      to pass-in the actual target on per-packet basis from neighbor
      layer. Detect these tunnels by inspecting the actual tunnel
      configuration.
      
      Minimal test case:
       ip route add 192.168.1.1/32 via 10.0.0.1
       ip route add 192.168.1.2/32 via 10.0.0.2
       ip tunnel add nbma0 mode gre key 1 tos c0
       ip addr add 172.17.0.0/16 dev nbma0
       ip link set nbma0 up
       ip neigh add 172.17.0.1 lladdr 192.168.1.1 dev nbma0
       ip neigh add 172.17.0.2 lladdr 192.168.1.2 dev nbma0
       ping 172.17.0.1
       ping 172.17.0.2
      
      The second ping should be going to 192.168.1.2 and head 10.0.0.2;
      but cached gre tunnel level route is used and it's actually going
      to 192.168.1.1 via 10.0.0.1.
      
      The lladdr's need to go to separate dst for the bug to trigger.
      Test case uses separate route entries, but this can also happen
      when the route entry is same: if there is a nexthop exception or
      the GRE tunnel is IPsec'ed in which case the dst points to xfrm
      bundle unique to the gre lladdr.
      
      Fixes: 7d442fab ("ipv4: Cache dst in tunnels")
      Signed-off-by: NTimo Teräs <timo.teras@iki.fi>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22fb22ea
  3. 06 5月, 2014 1 次提交
  4. 17 4月, 2014 1 次提交
  5. 16 4月, 2014 1 次提交
  6. 27 3月, 2014 1 次提交
  7. 25 2月, 2014 1 次提交
    • S
      ip_tunnel: Make vti work with i_key set · 6d608f06
      Steffen Klassert 提交于
      Vti uses the o_key to mark packets that were transmitted or received
      by a vti interface. Unfortunately we can't apply different marks
      to in and outbound packets with only one key availabe. Vti interfaces
      typically use wildcard selectors for vti IPsec policies. On forwarding,
      the same output policy will match for both directions. This generates
      a loop between the IPsec gateways until the ttl of the packet is
      exceeded.
      
      The gre i_key/o_key are usually there to find the right gre tunnel
      during a lookup. When vti uses the i_key to mark packets, the tunnel
      lookup does not work any more because vti does not use the gre keys
      as a hash key for the lookup.
      
      This patch workarounds this my not including the i_key when comupting
      the hash for the tunnel lookup in case of vti tunnels.
      
      With this we have separate keys available for the transmitting and
      receiving side of the vti interface.
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      6d608f06
  8. 21 2月, 2014 1 次提交
  9. 20 2月, 2014 1 次提交
  10. 17 2月, 2014 1 次提交
  11. 15 2月, 2014 1 次提交
  12. 04 2月, 2014 1 次提交
  13. 28 1月, 2014 1 次提交
  14. 24 1月, 2014 1 次提交
  15. 22 1月, 2014 1 次提交
  16. 19 1月, 2014 1 次提交
  17. 18 1月, 2014 1 次提交
    • E
      ipv4: fix a dst leak in tunnels · 6c7e7610
      Eric Dumazet 提交于
      This patch :
      
      1) Remove a dst leak if DST_NOCACHE was set on dst
         Fix this by holding a reference only if dst really cached.
      
      2) Remove a lockdep warning in __tunnel_dst_set()
          This was reported by Cong Wang.
      
      3) Remove usage of a spinlock where xchg() is enough
      
      4) Remove some spurious inline keywords.
         Let compiler decide for us.
      
      Fixes: 7d442fab ("ipv4: Cache dst in tunnels")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Cong Wang <cwang@twopensource.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Maciej Żenczykowski <maze@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c7e7610
  18. 10 1月, 2014 1 次提交
  19. 05 1月, 2014 1 次提交
  20. 04 1月, 2014 2 次提交
  21. 14 11月, 2013 1 次提交
    • A
      core/dev: do not ignore dmac in dev_forward_skb() · 81b9eab5
      Alexei Starovoitov 提交于
      commit 06a23fe3
      ("core/dev: set pkt_type after eth_type_trans() in dev_forward_skb()")
      and refactoring 64261f23
      ("dev: move skb_scrub_packet() after eth_type_trans()")
      
      are forcing pkt_type to be PACKET_HOST when skb traverses veth.
      
      which means that ip forwarding will kick in inside netns
      even if skb->eth->h_dest != dev->dev_addr
      
      Fix order of eth_type_trans() and skb_scrub_packet() in dev_forward_skb()
      and in ip_tunnel_rcv()
      
      Fixes: 06a23fe3 ("core/dev: set pkt_type after eth_type_trans() in dev_forward_skb()")
      CC: Isaku Yamahata <yamahatanetdev@gmail.com>
      CC: Maciej Zenczykowski <zenczykowski@gmail.com>
      CC: Nicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      81b9eab5
  22. 06 11月, 2013 1 次提交
    • J
      net: Explicitly initialize u64_stats_sync structures for lockdep · 827da44c
      John Stultz 提交于
      In order to enable lockdep on seqcount/seqlock structures, we
      must explicitly initialize any locks.
      
      The u64_stats_sync structure, uses a seqcount, and thus we need
      to introduce a u64_stats_init() function and use it to initialize
      the structure.
      
      This unfortunately adds a lot of fairly trivial initialization code
      to a number of drivers. But the benefit of ensuring correctness makes
      this worth while.
      
      Because these changes are required for lockdep to be enabled, and the
      changes are quite trivial, I've not yet split this patch out into 30-some
      separate patches, as I figured it would be better to get the various
      maintainers thoughts on how to best merge this change along with
      the seqcount lockdep enablement.
      
      Feedback would be appreciated!
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Acked-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: James Morris <jmorris@namei.org>
      Cc: Jesse Gross <jesse@nicira.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Mirko Lindner <mlindner@marvell.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Roger Luethi <rl@hellgate.ch>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Wensong Zhang <wensong@linux-vs.org>
      Cc: netdev@vger.kernel.org
      Link: http://lkml.kernel.org/r/1381186321-4906-2-git-send-email-john.stultz@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      827da44c
  23. 02 10月, 2013 3 次提交
  24. 01 10月, 2013 1 次提交
  25. 04 9月, 2013 4 次提交
  26. 26 8月, 2013 1 次提交
  27. 21 8月, 2013 1 次提交
  28. 15 8月, 2013 3 次提交
  29. 08 8月, 2013 1 次提交
  30. 12 7月, 2013 1 次提交
  31. 03 7月, 2013 1 次提交
  32. 28 6月, 2013 1 次提交
    • N
      sit: add support of x-netns · 5e6700b3
      Nicolas Dichtel 提交于
      This patch allows to switch the netns when packet is encapsulated or
      decapsulated. In other word, the encapsulated packet is received in a netns,
      where the lookup is done to find the tunnel. Once the tunnel is found, the
      packet is decapsulated and injecting into the corresponding interface which
      stands to another netns.
      
      When one of the two netns is removed, the tunnel is destroyed.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5e6700b3