datapath: Fix a kernel crash when adding a 2nd VXLAN port with existing UDP port
authorKyle Mestery <kmestery@cisco.com>
Wed, 9 Jan 2013 19:47:41 +0000 (14:47 -0500)
committerJesse Gross <jesse@nicira.com>
Wed, 9 Jan 2013 20:04:15 +0000 (12:04 -0800)
When creating a second VXLAN tunnel port with the same UDP
port as an existing VXLAN tunnel port, make sure to set
*vxport before returning. Fixes a kernel crash.

Reported-by: Todd Ruch <Todd.Ruch@wwtas.com>
Signed-off-by: Kyle Mestery <kmestery@cisco.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/vport-vxlan.c

index a2cbeb9..f72b95f 100644 (file)
@@ -267,6 +267,7 @@ static int vxlan_tunnel_setup(struct net *net, struct nlattr *options,
        if (vxlan_port) {
                vxlan_port->count++;
                err = 0;
+               *vxport = vxlan_port;
                goto out;
        }