1. 19 3月, 2016 3 次提交
  2. 15 3月, 2016 7 次提交
  3. 14 3月, 2016 1 次提交
  4. 02 3月, 2016 1 次提交
  5. 20 2月, 2016 2 次提交
  6. 19 2月, 2016 2 次提交
  7. 17 2月, 2016 1 次提交
  8. 11 2月, 2016 1 次提交
    • T
      openvswitch: allow management from inside user namespaces · 4a92602a
      Tycho Andersen 提交于
      Operations with the GENL_ADMIN_PERM flag fail permissions checks because
      this flag means we call netlink_capable, which uses the init user ns.
      
      Instead, let's introduce a new flag, GENL_UNS_ADMIN_PERM for operations
      which should be allowed inside a user namespace.
      
      The motivation for this is to be able to run openvswitch in unprivileged
      containers. I've tested this and it seems to work, but I really have no
      idea about the security consequences of this patch, so thoughts would be
      much appreciated.
      
      v2: use the GENL_UNS_ADMIN_PERM flag instead of a check in each function
      v3: use separate ifs for UNS_ADMIN_PERM and ADMIN_PERM, instead of one
          massive one
      Reported-by: NJames Page <james.page@canonical.com>
      Signed-off-by: NTycho Andersen <tycho.andersen@canonical.com>
      CC: Eric Biederman <ebiederm@xmission.com>
      CC: Pravin Shelar <pshelar@ovn.org>
      CC: Justin Pettit <jpettit@nicira.com>
      CC: "David S. Miller" <davem@davemloft.net>
      Acked-by: NPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a92602a
  9. 10 2月, 2016 1 次提交
    • D
      vxlan, gre, geneve: Set a large MTU on ovs-created tunnel devices · 7e059158
      David Wragg 提交于
      Prior to 4.3, openvswitch tunnel vports (vxlan, gre and geneve) could
      transmit vxlan packets of any size, constrained only by the ability to
      send out the resulting packets.  4.3 introduced netdevs corresponding
      to tunnel vports.  These netdevs have an MTU, which limits the size of
      a packet that can be successfully encapsulated.  The default MTU
      values are low (1500 or less), which is awkwardly small in the context
      of physical networks supporting jumbo frames, and leads to a
      conspicuous change in behaviour for userspace.
      
      Instead, set the MTU on openvswitch-created netdevs to be the relevant
      maximum (i.e. the maximum IP packet size minus any relevant overhead),
      effectively restoring the behaviour prior to 4.3.
      Signed-off-by: NDavid Wragg <david@weave.works>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e059158
  10. 19 1月, 2016 1 次提交
    • H
      ovs: limit ovs recursions in ovs_execute_actions to not corrupt stack · b064d0d8
      Hannes Frederic Sowa 提交于
      It was seen that defective configurations of openvswitch could overwrite
      the STACK_END_MAGIC and cause a hard crash of the kernel because of too
      many recursions within ovs.
      
      This problem arises due to the high stack usage of openvswitch. The rest
      of the kernel is fine with the current limit of 10 (RECURSION_LIMIT).
      
      We use the already existing recursion counter in ovs_execute_actions to
      implement an upper bound of 5 recursions.
      
      Cc: Pravin Shelar <pshelar@ovn.org>
      Cc: Simon Horman <simon.horman@netronome.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Simon Horman <simon.horman@netronome.com>
      Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b064d0d8
  11. 16 1月, 2016 1 次提交
  12. 11 1月, 2016 3 次提交
  13. 30 12月, 2015 1 次提交
    • J
      openvswitch: Fix template leak in error cases. · 90c7afc9
      Joe Stringer 提交于
      Commit 5b48bb8506c5 ("openvswitch: Fix helper reference leak") fixed a
      reference leak on helper objects, but inadvertently introduced a leak on
      the ct template.
      
      Previously, ct_info.ct->general.use was initialized to 0 by
      nf_ct_tmpl_alloc() and only incremented when ovs_ct_copy_action()
      returned successful. If an error occurred while adding the helper or
      adding the action to the actions buffer, the __ovs_ct_free_action()
      cleanup would use nf_ct_put() to free the entry; However, this relies on
      atomic_dec_and_test(ct_info.ct->general.use). This reference must be
      incremented first, or nf_ct_put() will never free it.
      
      Fix the issue by acquiring a reference to the template immediately after
      allocation.
      
      Fixes: cae3a262 ("openvswitch: Allow attaching helpers to ct action")
      Fixes: 5b48bb8506c5 ("openvswitch: Fix helper reference leak")
      Signed-off-by: NJoe Stringer <joe@ovn.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90c7afc9
  14. 19 12月, 2015 1 次提交
  15. 12 12月, 2015 2 次提交
  16. 04 12月, 2015 3 次提交
  17. 03 12月, 2015 1 次提交
  18. 25 11月, 2015 1 次提交
  19. 24 11月, 2015 2 次提交
    • F
      netfilter: ipv6: avoid nf_iterate recursion · daaa7d64
      Florian Westphal 提交于
      The previous patch changed nf_ct_frag6_gather() to morph reassembled skb
      with the previous one.
      
      This means that the return value is always NULL or the skb argument.
      So change it to an err value.
      
      Instead of invoking NF_HOOK recursively with threshold to skip already-called hooks
      we can now just return NF_ACCEPT to move on to the next hook except for
      -EINPROGRESS (which means skb has been queued for reassembly), in which case we
      return NF_STOLEN.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      daaa7d64
    • F
      netfilter: ipv6: nf_defrag: avoid/free clone operations · 029f7f3b
      Florian Westphal 提交于
      commit 6aafeef0
      ("netfilter: push reasm skb through instead of original frag skbs")
      changed ipv6 defrag to not use the original skbs anymore.
      
      So rather than keeping the original skbs around just to discard them
      afterwards just use the original skbs directly for the fraglist of
      the newly assembled skb and remove the extra clone/free operations.
      
      The skb that completes the fragment queue is morphed into a the
      reassembled one instead, just like ipv4 defrag.
      
      openvswitch doesn't need any additional skb_morph magic anymore to deal
      with this situation so just remove that.
      
      A followup patch can then also remove the NF_HOOK (re)invocation in
      the ipv6 netfilter defrag hook.
      
      Cc: Joe Stringer <joestringer@nicira.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      029f7f3b
  20. 28 10月, 2015 2 次提交
  21. 23 10月, 2015 1 次提交
    • P
      openvswitch: Fix egress tunnel info. · fc4099f1
      Pravin B Shelar 提交于
      While transitioning to netdev based vport we broke OVS
      feature which allows user to retrieve tunnel packet egress
      information for lwtunnel devices.  Following patch fixes it
      by introducing ndo operation to get the tunnel egress info.
      Same ndo operation can be used for lwtunnel devices and compat
      ovs-tnl-vport devices. So after adding such device operation
      we can remove similar operation from ovs-vport.
      
      Fixes: 614732ea ("openvswitch: Use regular VXLAN net_device device").
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fc4099f1
  22. 22 10月, 2015 2 次提交