- call ip6_output() instead of nd6_output() when ipsec tunnel   mode is applied, since tunneled packets are considered to be   generated packets from a tunnel encapsulating node. - tunnel mode may not be applied if SA mode is ANY and policy   does not say "tunnel it".  check if we have extra IPv6 header   on the packet after ipsec6_output_tunnel() and call ip6_output()   only if additional IPv6 header is added. - free the copyed packet before returning.
- call ip6_output() instead of nd6_output() when ipsec tunnel
  mode is applied, since tunneled packets are considered to be
  generated packets from a tunnel encapsulating node.
- tunnel mode may not be applied if SA mode is ANY and policy
  does not say "tunnel it".  check if we have extra IPv6 header
  on the packet after ipsec6_output_tunnel() and call ip6_output()
  only if additional IPv6 header is added.
- free the copyed packet before returning.

Obtained from:	KAME

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase