1. 10 2月, 2016 2 次提交
    • 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
    • D
      vxlan: Relax MTU constraints · 72564b59
      David Wragg 提交于
      Allow the MTU of vxlan devices without an underlying device to be set
      to larger values (up to a maximum based on IP packet limits and vxlan
      overhead).
      
      Previously, their MTUs could not be set to higher than the
      conventional ethernet value of 1500.  This is a very arbitrary value
      in the context of vxlan, and prevented vxlan devices from being able
      to take advantage of jumbo frames etc.
      
      The default MTU remains 1500, for compatibility.
      Signed-off-by: NDavid Wragg <david@weave.works>
      Acked-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72564b59
  2. 30 1月, 2016 1 次提交
    • L
      vxlan: fix a out of bounds access in __vxlan_find_mac · 7256eac1
      Li RongQing 提交于
      The size of all_zeros_mac is 6 byte, but eth_hash() will access the
      8 byte, and KASan reported the below bug:
      
      [ 8596.479031] BUG: KASan: out of bounds access in __vxlan_find_mac+0x24/0x100 at addr ffffffff841514c0
      [ 8596.487647] Read of size 8 by task ip/52820
      [ 8596.490818] Address belongs to variable all_zeros_mac+0x0/0x40
      [ 8596.496051] CPU: 0 PID: 52820 Comm: ip Tainted: G WC 4.1.15 #1
      [ 8596.503520] Hardware name: HP ProLiant DL380p Gen8, BIOS P70 02/10/2014
      [ 8596.509365] ffffffff841514c0 ffff88007450f0b8 ffffffff822fa5e1 0000000000000032
      [ 8596.516112] ffff88007450f150 ffff88007450f138 ffffffff812dd58c ffff88007450f1d8
      [ 8596.522856] ffffffff81113b80 0000000000000282 0000000000000001 ffffffff8101ee4d
      [ 8596.529599] Call Trace:
      [ 8596.530858] [<ffffffff822fa5e1>] dump_stack+0x4f/0x7b
      [ 8596.535080] [<ffffffff812dd58c>] kasan_report_error+0x3bc/0x3f0
      [ 8596.540258] [<ffffffff81113b80>] ? __lock_acquire+0x90/0x2140
      [ 8596.545245] [<ffffffff8101ee4d>] ? save_stack_trace+0x2d/0x80
      [ 8596.550234] [<ffffffff812dda70>] kasan_report+0x40/0x50
      [ 8596.554647] [<ffffffff81b211e4>] ? __vxlan_find_mac+0x24/0x100
      [ 8596.559729] [<ffffffff812dc399>] __asan_load8+0x69/0xa0
      [ 8596.564141] [<ffffffff81b211e4>] __vxlan_find_mac+0x24/0x100
      [ 8596.569033] [<ffffffff81b2683d>] vxlan_fdb_create+0x9d/0x570
      
      it can be fixed by enlarging the all_zeros_mac to 8 byte, although it is
      harmless; eth_hash() will be called in other place with the memory which
      is larger and equal to 8 byte.
      Signed-off-by: NLi RongQing <roy.qing.li@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7256eac1
  3. 22 1月, 2016 1 次提交
  4. 11 1月, 2016 1 次提交
    • H
      udp: restrict offloads to one namespace · 787d7ac3
      Hannes Frederic Sowa 提交于
      udp tunnel offloads tend to aggregate datagrams based on inner
      headers. gro engine gets notified by tunnel implementations about
      possible offloads. The match is solely based on the port number.
      
      Imagine a tunnel bound to port 53, the offloading will look into all
      DNS packets and tries to aggregate them based on the inner data found
      within. This could lead to data corruption and malformed DNS packets.
      
      While this patch minimizes the problem and helps an administrator to find
      the issue by querying ip tunnel/fou, a better way would be to match on
      the specific destination ip address so if a user space socket is bound
      to the same address it will conflict.
      
      Cc: Tom Herbert <tom@herbertland.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      787d7ac3
  5. 10 1月, 2016 1 次提交
    • N
      vxlan: fix test which detect duplicate vxlan iface · 07b9b37c
      Nicolas Dichtel 提交于
      When a vxlan interface is created, the driver checks that there is not
      another vxlan interface with the same properties. To do this, it checks
      the existing vxlan udp socket. Since commit 1c51a915, the creation of
      the vxlan socket is done only when the interface is set up, thus it breaks
      that test.
      
      Example:
      $ ip l a vxlan10 type vxlan id 10 group 239.0.0.10 dev eth0 dstport 0
      $ ip l a vxlan11 type vxlan id 10 group 239.0.0.10 dev eth0 dstport 0
      $ ip -br l | grep vxlan
      vxlan10          DOWN           f2:55:1c:6a:fb:00 <BROADCAST,MULTICAST>
      vxlan11          DOWN           7a:cb:b9:38:59:0d <BROADCAST,MULTICAST>
      
      Instead of checking sockets, let's loop over the vxlan iface list.
      
      Fixes: 1c51a915 ("vxlan: fix race caused by dropping rtnl_unlock")
      Reported-by: NThomas Faivre <thomas.faivre@6wind.com>
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      07b9b37c
  6. 26 12月, 2015 1 次提交
  7. 08 12月, 2015 3 次提交
  8. 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
  9. 19 10月, 2015 1 次提交
    • J
      tunnels: Don't require remote endpoint or ID during creation. · e277de5f
      Jesse Gross 提交于
      Before lightweight tunnels existed, it really didn't make sense to
      create a tunnel that was not fully specified, such as without a
      destination IP address - the resulting packets would go nowhere.
      However, with lightweight tunnels, the opposite is true - it doesn't
      make sense to require this information when it will be provided later
      on by the route. This loosens the requirements for this information.
      
      An alternative would be to allow the relaxed version only when
      COLLECT_METADATA is enabled. However, since there are several
      variations on this theme (such as NBMA tunnels in GRE), just dropping
      the restrictions seems the most consistent across tunnels and with
      the existing configuration.
      
      CC: John Linville <linville@tuxdriver.com>
      Signed-off-by: NJesse Gross <jesse@nicira.com>
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e277de5f
  10. 27 9月, 2015 2 次提交
  11. 18 9月, 2015 2 次提交
  12. 07 9月, 2015 1 次提交
  13. 01 9月, 2015 1 次提交
  14. 30 8月, 2015 3 次提交
  15. 28 8月, 2015 1 次提交
  16. 26 8月, 2015 1 次提交
  17. 24 8月, 2015 2 次提交
  18. 21 8月, 2015 6 次提交
  19. 19 8月, 2015 1 次提交
  20. 11 8月, 2015 1 次提交
  21. 08 8月, 2015 1 次提交
  22. 01 8月, 2015 2 次提交
  23. 27 7月, 2015 1 次提交
  24. 22 7月, 2015 3 次提交