diff --git a/sys/netinet6/ip6_ipsec.c b/sys/netinet6/ip6_ipsec.c index 73b9efe6dba0..5d0dea56cea0 100644 --- a/sys/netinet6/ip6_ipsec.c +++ b/sys/netinet6/ip6_ipsec.c @@ -313,6 +313,7 @@ ip6_ipsec_output(struct mbuf **m, struct inpcb *inp, int *flags, int *error, return 0; } +#if 0 /* * Compute the MTU for a forwarded packet that gets IPSEC encapsulated. * Called from ip_forward(). @@ -328,16 +329,15 @@ ip6_ipsec_mtu(struct mbuf *m) * tunnel MTU = if MTU - sizeof(IP) - ESP/AH hdrsiz * XXX quickhack!!! */ +#ifdef IPSEC struct secpolicy *sp = NULL; int ipsecerror; int ipsechdr; struct route *ro; -#ifdef IPSEC sp = ipsec_getpolicybyaddr(m, IPSEC_DIR_OUTBOUND, IP_FORWARDING, &ipsecerror); -#endif /* IPSEC */ if (sp != NULL) { /* count IPsec header size */ ipsechdr = ipsec4_hdrsiz(m, @@ -360,10 +360,10 @@ ip6_ipsec_mtu(struct mbuf *m) mtu -= ipsechdr; } } -#ifdef IPSEC KEY_FREESP(&sp); -#endif /* IPSEC */ } +#endif /* IPSEC */ + /* XXX else case missing. */ return mtu; } - +#endif diff --git a/sys/netinet6/ip6_ipsec.h b/sys/netinet6/ip6_ipsec.h index a02481156a4e..86d1b0050c25 100644 --- a/sys/netinet6/ip6_ipsec.h +++ b/sys/netinet6/ip6_ipsec.h @@ -35,7 +35,9 @@ int ip6_ipsec_filtertunnel(struct mbuf *); int ip6_ipsec_fwd(struct mbuf *); int ip6_ipsec_input(struct mbuf *, int); -int ip6_ipsec_mtu(struct mbuf *); int ip6_ipsec_output(struct mbuf **, struct inpcb *, int *, int *, struct ifnet **, struct secpolicy **sp); +#if 0 +int ip6_ipsec_mtu(struct mbuf *); +#endif #endif