From: Martin KaFai Lau <ka...@fb.com>
Date: Fri, 10 Apr 2015 18:54:07 -0700

> @@ -1171,8 +1170,15 @@ void ip6_update_pmtu(struct sk_buff *skb, struct net 
> *net, __be32 mtu,
>       fl6.flowlabel = ip6_flowinfo(iph);
>  
>       dst = ip6_route_output(net, NULL, &fl6);
> -     if (!dst->error)
> +     if (!dst->error) {
> +             unsigned char *outer_network_header = skb_network_header(skb);
> +             int offset;
> +
> +             skb_reset_network_header(skb);
> +             offset = outer_network_header - skb_network_header(skb);
>               ip6_rt_update_pmtu(dst, NULL, skb, ntohl(mtu));
> +             skb_set_network_header(skb, offset);
> +     }

I seriously object to adjusting then restoring the location of the SKB
network header in this kind of code path.

Instead, adjust the interfaces to the code doing the packet header
inspection so that it can accomodate an offset or something like that
instead.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to