netlink-protocol: Add more definitions.
[cascardo/ovs.git] / datapath / vport-lisp.c
index a124e73..81ecf92 100644 (file)
@@ -409,6 +409,11 @@ static int handle_offloads(struct sk_buff *skb)
 #else
 static int handle_offloads(struct sk_buff *skb)
 {
+       if (skb->encapsulation && skb_is_gso(skb)) {
+               kfree_skb(skb);
+               return -ENOSYS;
+       }
+
        if (skb_is_gso(skb)) {
                int err = skb_unclone(skb, GFP_ATOMIC);
                if (unlikely(err))
@@ -425,7 +430,7 @@ static int handle_offloads(struct sk_buff *skb)
 
 static int lisp_send(struct vport *vport, struct sk_buff *skb)
 {
-       struct ovs_key_ipv4_tunnel *tun_key = &OVS_CB(skb)->tun_info->tunnel;
+       struct ovs_key_ipv4_tunnel *tun_key;
        int network_offset = skb_network_offset(skb);
        struct rtable *rt;
        int min_headroom;
@@ -437,6 +442,8 @@ static int lisp_send(struct vport *vport, struct sk_buff *skb)
        if (unlikely(!OVS_CB(skb)->tun_info))
                return -EINVAL;
 
+       tun_key = &OVS_CB(skb)->tun_info->tunnel;
+
        if (skb->protocol != htons(ETH_P_IP) &&
            skb->protocol != htons(ETH_P_IPV6)) {
                kfree_skb(skb);