<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/vxlan.c, branch v3.18.62</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.62</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.62'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-04-18T05:55:51+00:00</updated>
<entry>
<title>vxlan: correctly validate VXLAN ID against VXLAN_N_VID</title>
<updated>2017-04-18T05:55:51+00:00</updated>
<author>
<name>Matthias Schiffer</name>
<email>mschiffer@universe-factory.net</email>
</author>
<published>2017-02-23T16:19:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=710b3205d2631e8ba40a6df07dad4c5a3e5cbfb2'/>
<id>urn:sha1:710b3205d2631e8ba40a6df07dad4c5a3e5cbfb2</id>
<content type='text'>
commit 4e37d6911f36545b286d15073f6f2222f840e81c upstream.

The incorrect check caused an off-by-one error: the maximum VID 0xffffff
was unusable.

Fixes: d342894c5d2f ("vxlan: virtual extensible lan")
Signed-off-by: Matthias Schiffer &lt;mschiffer@universe-factory.net&gt;
Acked-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>vxlan: fix test which detect duplicate vxlan iface</title>
<updated>2016-02-15T20:42:43+00:00</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2016-01-07T10:26:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d2f500d1a118bb5cd55133c9482fd7ccb810aed7'/>
<id>urn:sha1:d2f500d1a118bb5cd55133c9482fd7ccb810aed7</id>
<content type='text'>
[ Upstream commit 07b9b37c227cb8d88d478b4a9c5634fee514ede1 ]

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 1c51a9159dde, 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 &lt;BROADCAST,MULTICAST&gt;
vxlan11          DOWN           7a:cb:b9:38:59:0d &lt;BROADCAST,MULTICAST&gt;

Instead of checking sockets, let's loop over the vxlan iface list.

Fixes: 1c51a9159dde ("vxlan: fix race caused by dropping rtnl_unlock")
Reported-by: Thomas Faivre &lt;thomas.faivre@6wind.com&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>udptunnels: Call handle_offloads after inserting vlan tag.</title>
<updated>2015-04-27T21:13:41+00:00</updated>
<author>
<name>Jesse Gross</name>
<email>jesse@nicira.com</email>
</author>
<published>2015-04-09T18:19:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=218aa70e49b61fd49691a688309bdee22608c9bb'/>
<id>urn:sha1:218aa70e49b61fd49691a688309bdee22608c9bb</id>
<content type='text'>
[ Upstream commit b736a623bd099cdf5521ca9bd03559f3bc7fa31c ]

handle_offloads() calls skb_reset_inner_headers() to store
the layer pointers to the encapsulated packet. However, we
currently push the vlag tag (if there is one) onto the packet
afterwards. This changes the MAC header for the encapsulated
packet but it is not reflected in skb-&gt;inner_mac_header, which
breaks GSO and drivers which attempt to use this for encapsulation
offloads.

Fixes: 1eaa8178 ("vxlan: Add tx-vlan offload support.")
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>vxlan: Fix double free of skb.</title>
<updated>2015-04-27T20:48:35+00:00</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2014-12-24T00:20:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=754a19948ec440acc781d3870d48329c802a6eb7'/>
<id>urn:sha1:754a19948ec440acc781d3870d48329c802a6eb7</id>
<content type='text'>
[ Upstream commit 74f47278cb056ffe1d261df3e094d608c3569829 ]

In case of error vxlan_xmit_one() can free already freed skb.
Also fixes memory leak of dst-entry.

Fixes: acbf74a7630 ("vxlan: Refactor vxlan driver to make use
of the common UDP tunnel functions").

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>vlan: introduce *vlan_hwaccel_push_inside helpers</title>
<updated>2015-04-27T20:48:34+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@resnulli.us</email>
</author>
<published>2014-11-19T13:04:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a67e2e88342accd49587d9bad72f6dabd7673f7c'/>
<id>urn:sha1:a67e2e88342accd49587d9bad72f6dabd7673f7c</id>
<content type='text'>
[ Upstream commit 5968250c868ceee680aa77395b24e6ddcae17d36 ]

Use them to push skb-&gt;vlan_tci into the payload and avoid code
duplication.

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Acked-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>vlan: rename __vlan_put_tag to vlan_insert_tag_set_proto</title>
<updated>2015-04-27T20:48:33+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@resnulli.us</email>
</author>
<published>2014-11-19T13:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d329729a26406301996d4ae63b3d7d489bd2f361'/>
<id>urn:sha1:d329729a26406301996d4ae63b3d7d489bd2f361</id>
<content type='text'>
[ Upstream commit 62749e2cb3c4a7da3eaa5c01a7e787aebeff8536 ]

Name fits better. Plus there's going to be introduced
__vlan_insert_tag later on.

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Acked-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>Fix race condition between vxlan_sock_add and vxlan_sock_release</title>
<updated>2014-12-16T17:39:04+00:00</updated>
<author>
<name>Marcelo Leitner</name>
<email>mleitner@redhat.com</email>
</author>
<published>2014-12-11T12:02:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8407165b426600915d1409479be237b70a10a759'/>
<id>urn:sha1:8407165b426600915d1409479be237b70a10a759</id>
<content type='text'>
[ Upstream commit 00c83b01d58068dfeb2e1351cca6fccf2a83fa8f ]

Currently, when trying to reuse a socket, vxlan_sock_add will grab
vn-&gt;sock_lock, locate a reusable socket, inc refcount and release
vn-&gt;sock_lock.

But vxlan_sock_release() will first decrement refcount, and then grab
that lock. refcnt operations are atomic but as currently we have
deferred works which hold vs-&gt;refcnt each, this might happen, leading to
a use after free (specially after vxlan_igmp_leave):

  CPU 1                            CPU 2

deferred work                    vxlan_sock_add
  ...                              ...
                                   spin_lock(&amp;vn-&gt;sock_lock)
                                   vs = vxlan_find_sock();
  vxlan_sock_release
    dec vs-&gt;refcnt, reaches 0
    spin_lock(&amp;vn-&gt;sock_lock)
                                   vxlan_sock_hold(vs), refcnt=1
                                   spin_unlock(&amp;vn-&gt;sock_lock)
    hlist_del_rcu(&amp;vs-&gt;hlist);
    vxlan_notify_del_rx_port(vs)
    spin_unlock(&amp;vn-&gt;sock_lock)

So when we look for a reusable socket, we check if it wasn't freed
already before reusing it.

Signed-off-by: Marcelo Ricardo Leitner &lt;mleitner@redhat.com&gt;
Fixes: 7c47cedf43a8b3 ("vxlan: move IGMP join/leave to work queue")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vxlan: Fix boolean flip in VXLAN_F_UDP_ZERO_CSUM6_[TX|RX]</title>
<updated>2014-11-25T19:12:12+00:00</updated>
<author>
<name>Alexander Duyck</name>
<email>alexander.h.duyck@redhat.com</email>
</author>
<published>2014-11-25T04:08:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3dc2b6a8d38cf6c7604ec25f3d50d6ec8da04435'/>
<id>urn:sha1:3dc2b6a8d38cf6c7604ec25f3d50d6ec8da04435</id>
<content type='text'>
In "vxlan: Call udp_sock_create" there was a logic error that resulted in
the default for IPv6 VXLAN tunnels going from using checksums to not using
checksums.  Since there is currently no support in iproute2 for setting
these values it means that a kernel after the change cannot talk over a IPv6
VXLAN tunnel to a kernel prior the change.

Fixes: 3ee64f3 ("vxlan: Call udp_sock_create")

Cc: Tom Herbert &lt;therbert@google.com&gt;
Signed-off-by: Alexander Duyck &lt;alexander.h.duyck@redhat.com&gt;
Acked-by: Tom Herbert &lt;therbert@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vxlan: Inline vxlan_gso_check().</title>
<updated>2014-11-18T20:38:44+00:00</updated>
<author>
<name>Joe Stringer</name>
<email>joestringer@nicira.com</email>
</author>
<published>2014-11-18T00:24:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=11bf7828a59880427403e13dcff8228d67e9e0f7'/>
<id>urn:sha1:11bf7828a59880427403e13dcff8228d67e9e0f7</id>
<content type='text'>
Suggested-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Joe Stringer &lt;joestringer@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Add vxlan_gso_check() helper</title>
<updated>2014-11-14T22:12:48+00:00</updated>
<author>
<name>Joe Stringer</name>
<email>joestringer@nicira.com</email>
</author>
<published>2014-11-14T00:38:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23e62de33d179e229e4c1dfd93f90a3c7355c519'/>
<id>urn:sha1:23e62de33d179e229e4c1dfd93f90a3c7355c519</id>
<content type='text'>
Most NICs that report NETIF_F_GSO_UDP_TUNNEL support VXLAN, and not
other UDP-based encapsulation protocols where the format and size of the
header differs. This patch implements a generic ndo_gso_check() for
VXLAN which will only advertise GSO support when the skb looks like it
contains VXLAN (or no UDP tunnelling at all).

Implementation shamelessly stolen from Tom Herbert:
http://thread.gmane.org/gmane.linux.network/332428/focus=333111

Signed-off-by: Joe Stringer &lt;joestringer@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
