[ovs-dev] [PATCHv2] Add support for LISP tunneling
Rajahalme, Jarno (NSN - FI/Espoo)
jarno.rajahalme at nsn.com
Thu Feb 14 10:59:17 UTC 2013
On Feb 13, 2013, at 16:44 , ext Lorand Jakab wrote:
> +static int lisp_tnl_send(struct vport *vport, struct sk_buff *skb)
> +{
> + int network_offset = skb_network_offset(skb);
> +
> + /* We only encapsulate IPv4 and IPv6 packets */
> + switch (ntohs(skb->protocol)) {
> + case ETH_P_IP:
> + case ETH_P_IPV6:
> + /* Pop off "inner" Ethernet header */
> + skb_pull(skb, network_offset);
> + return ovs_tnl_send(vport, skb) + network_offset;
I haven't checked this to be sure, but maybe you do want to return zero if ovs_tnl_send() returns zero? I.e. add network_offset only to non-zero return values?
> + default:
> + kfree_skb(skb);
> + return 0;
> + }
> +}
More information about the dev
mailing list