1. 05 1月, 2014 1 次提交
  2. 04 1月, 2014 2 次提交
  3. 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
  4. 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
  5. 02 10月, 2013 3 次提交
  6. 01 10月, 2013 1 次提交
  7. 04 9月, 2013 4 次提交
  8. 26 8月, 2013 1 次提交
  9. 21 8月, 2013 1 次提交
  10. 15 8月, 2013 3 次提交
  11. 08 8月, 2013 1 次提交
  12. 12 7月, 2013 1 次提交
  13. 03 7月, 2013 1 次提交
  14. 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
  15. 27 6月, 2013 1 次提交
  16. 20 6月, 2013 2 次提交
  17. 13 6月, 2013 1 次提交
  18. 01 6月, 2013 1 次提交
  19. 26 5月, 2013 1 次提交
    • E
      ip_tunnel: fix kernel panic with icmp_dest_unreach · a6222602
      Eric Dumazet 提交于
      Daniel Petre reported crashes in icmp_dst_unreach() with following call
      graph:
      
      #3 [ffff88003fc03938] __stack_chk_fail at ffffffff81037f77
      #4 [ffff88003fc03948] icmp_send at ffffffff814d5fec
      #5 [ffff88003fc03ae8] ipv4_link_failure at ffffffff814a1795
      #6 [ffff88003fc03af8] ipgre_tunnel_xmit at ffffffff814e7965
      #7 [ffff88003fc03b78] dev_hard_start_xmit at ffffffff8146e032
      #8 [ffff88003fc03bc8] sch_direct_xmit at ffffffff81487d66
      #9 [ffff88003fc03c08] __qdisc_run at ffffffff81487efd
      #10 [ffff88003fc03c48] dev_queue_xmit at ffffffff8146e5a7
      #11 [ffff88003fc03c88] ip_finish_output at ffffffff814ab596
      
      Daniel found a similar problem mentioned in
       http://lkml.indiana.edu/hypermail/linux/kernel/1007.0/00961.html
      
      And indeed this is the root cause : skb->cb[] contains data fooling IP
      stack.
      
      We must clear IPCB in ip_tunnel_xmit() sooner in case dst_link_failure()
      is called. Or else skb->cb[] might contain garbage from GSO segmentation
      layer.
      
      A similar fix was tested on linux-3.9, but gre code was refactored in
      linux-3.10. I'll send patches for stable kernels as well.
      
      Many thanks to Daniel for providing reports, patches and testing !
      Reported-by: NDaniel Petre <daniel.petre@rcs-rds.ro>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6222602
  20. 30 3月, 2013 1 次提交
  21. 27 3月, 2013 1 次提交
    • P
      GRE: Refactor GRE tunneling code. · c5441932
      Pravin B Shelar 提交于
      Following patch refactors GRE code into ip tunneling code and GRE
      specific code. Common tunneling code is moved to ip_tunnel module.
      ip_tunnel module is written as generic library which can be used
      by different tunneling implementations.
      
      ip_tunnel module contains following components:
       - packet xmit and rcv generic code. xmit flow looks like
         (gre_xmit/ipip_xmit)->ip_tunnel_xmit->ip_local_out.
       - hash table of all devices.
       - lookup for tunnel devices.
       - control plane operations like device create, destroy, ioctl, netlink
         operations code.
       - registration for tunneling modules, like gre, ipip etc.
       - define single pcpu_tstats dev->tstats.
       - struct tnl_ptk_info added to pass parsed tunnel packet parameters.
      
      ipip.h header is renamed to ip_tunnel.h
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5441932