> It would have been even worse, IMHO, to have two copies of
> nearly identical code sitting around which is basically what
> the alternative is.

   We don't need two copies. We just need a function that does the real
 work if there is a tunnel to be used (what xfrm6_tunnel needs), and
 another one that would call the previous (used when xfrm6_tunnel isn't
 used) that frees the skb on errors. Something like:

   int ip6ip6_rcv(...) {
     ...
   }

   int ip6ip6_proto_rcv(...) {
     int res = ip6ip6_rcv();
     if (res < 0) {
        icmpv6_send_error();
        kfree_skb();
     }
     return res;
   }

   Where ip6ip6_rcv is used when ip6_tunnel is registed via
 xfrm6_tunnel, and the second as the IPPROTO_IPV6 handler (when this
 functionality is compiled in).

   Hugo

> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: Digital signature

Reply via email to