summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_ipsec.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2008-03-14 11:44:30 +0000
committerbz <bz@FreeBSD.org>2008-03-14 11:44:30 +0000
commitf507f0e4fa09490b9ebafe2650f0d70e6daa51e9 (patch)
tree1ad3ecc51385d2a736ba9c558840d6ddce9e0bbf /sys/netinet6/ip6_ipsec.c
parent693055a8ae2520b8199c4b351a7d8081891fe0a6 (diff)
downloadFreeBSD-src-f507f0e4fa09490b9ebafe2650f0d70e6daa51e9.zip
FreeBSD-src-f507f0e4fa09490b9ebafe2650f0d70e6daa51e9.tar.gz
#if 0 out a currently unsued (and incomplete) function: ip6_ipsec_mtu().
No need to compile 'dead' code. I am leaving it in because we will have to review the concept and should use the common function in various places. MFC after: 5 days
Diffstat (limited to 'sys/netinet6/ip6_ipsec.c')
-rw-r--r--sys/netinet6/ip6_ipsec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet6/ip6_ipsec.c b/sys/netinet6/ip6_ipsec.c
index 73b9efe..5d0dea5 100644
--- a/sys/netinet6/ip6_ipsec.c
+++ b/sys/netinet6/ip6_ipsec.c
@@ -313,6 +313,7 @@ bad:
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
OpenPOWER on IntegriCloud