/* Save outer tunnel values */
iph = ip_hdr(skb);
- tnl_tun_key_init(&tun_key, iph, key, OVS_TNL_F_KEY);
- OVS_CB(skb)->tun_key = &tun_key;
+ tnl_tun_key_init(&tun_key, iph, key, TUNNEL_KEY);
/* Drop non-IP inner packets */
inner_iph = (struct iphdr *)(lisph + 1);
ethh->h_source[0] = 0x02;
ethh->h_proto = protocol;
- ovs_tnl_rcv(vport_from_priv(lisp_port), skb);
+ ovs_skb_postpush_rcsum(skb, skb->data, ETH_HLEN);
+
+ ovs_tnl_rcv(vport_from_priv(lisp_port), skb, &tun_key);
goto out;
error:
int tnl_len;
int network_offset = skb_network_offset(skb);
- if (unlikely(!OVS_CB(skb)->tun_key)) {
- ovs_vport_record_error(vport, VPORT_E_TX_ERROR);
- goto free;
- }
+ if (unlikely(!OVS_CB(skb)->tun_key))
+ return -EINVAL;
/* We only encapsulate IPv4 and IPv6 packets */
switch (skb->protocol) {
LISP_HLEN, lisp_build_header);
return tnl_len > 0 ? tnl_len + network_offset : tnl_len;
default:
- ovs_vport_record_error(vport, VPORT_E_TX_DROPPED);
- goto free;
+ kfree_skb(skb);
+ return 0;
}
-
-free:
- kfree_skb(skb);
- return 0;
}
static const char *lisp_get_name(const struct vport *vport)
const struct vport_ops ovs_lisp_vport_ops = {
.type = OVS_VPORT_TYPE_LISP,
- .flags = VPORT_F_TUN_ID,
.create = lisp_tnl_create,
.destroy = lisp_tnl_destroy,
.get_name = lisp_get_name,