ip_tunnels: record IP version in tunnel info
[linux-2.6-block.git] / drivers / net / vxlan.c
index bd1b8cdf2bf6febf06cd8016f5e27d0e44937229..e3adfe0ef66b30ff34d982f78a90e3accec9b552 100644 (file)
@@ -1903,6 +1903,8 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
                                  dev->name);
                        goto drop;
                }
+               if (family != ip_tunnel_info_af(info))
+                       goto drop;
 
                dst_port = info->key.tp_dst ? : vxlan->cfg.dst_port;
                vni = be64_to_cpu(info->key.tun_id);