#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
This commit is contained in:
parent
41aa71dd3e
commit
39d8cf90cb
@ -313,6 +313,7 @@ bad:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/*
|
/*
|
||||||
* Compute the MTU for a forwarded packet that gets IPSEC encapsulated.
|
* Compute the MTU for a forwarded packet that gets IPSEC encapsulated.
|
||||||
* Called from ip_forward().
|
* Called from ip_forward().
|
||||||
@ -328,16 +329,15 @@ ip6_ipsec_mtu(struct mbuf *m)
|
|||||||
* tunnel MTU = if MTU - sizeof(IP) - ESP/AH hdrsiz
|
* tunnel MTU = if MTU - sizeof(IP) - ESP/AH hdrsiz
|
||||||
* XXX quickhack!!!
|
* XXX quickhack!!!
|
||||||
*/
|
*/
|
||||||
|
#ifdef IPSEC
|
||||||
struct secpolicy *sp = NULL;
|
struct secpolicy *sp = NULL;
|
||||||
int ipsecerror;
|
int ipsecerror;
|
||||||
int ipsechdr;
|
int ipsechdr;
|
||||||
struct route *ro;
|
struct route *ro;
|
||||||
#ifdef IPSEC
|
|
||||||
sp = ipsec_getpolicybyaddr(m,
|
sp = ipsec_getpolicybyaddr(m,
|
||||||
IPSEC_DIR_OUTBOUND,
|
IPSEC_DIR_OUTBOUND,
|
||||||
IP_FORWARDING,
|
IP_FORWARDING,
|
||||||
&ipsecerror);
|
&ipsecerror);
|
||||||
#endif /* IPSEC */
|
|
||||||
if (sp != NULL) {
|
if (sp != NULL) {
|
||||||
/* count IPsec header size */
|
/* count IPsec header size */
|
||||||
ipsechdr = ipsec4_hdrsiz(m,
|
ipsechdr = ipsec4_hdrsiz(m,
|
||||||
@ -360,10 +360,10 @@ ip6_ipsec_mtu(struct mbuf *m)
|
|||||||
mtu -= ipsechdr;
|
mtu -= ipsechdr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef IPSEC
|
|
||||||
KEY_FREESP(&sp);
|
KEY_FREESP(&sp);
|
||||||
#endif /* IPSEC */
|
|
||||||
}
|
}
|
||||||
|
#endif /* IPSEC */
|
||||||
|
/* XXX else case missing. */
|
||||||
return mtu;
|
return mtu;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -35,7 +35,9 @@
|
|||||||
int ip6_ipsec_filtertunnel(struct mbuf *);
|
int ip6_ipsec_filtertunnel(struct mbuf *);
|
||||||
int ip6_ipsec_fwd(struct mbuf *);
|
int ip6_ipsec_fwd(struct mbuf *);
|
||||||
int ip6_ipsec_input(struct mbuf *, int);
|
int ip6_ipsec_input(struct mbuf *, int);
|
||||||
int ip6_ipsec_mtu(struct mbuf *);
|
|
||||||
int ip6_ipsec_output(struct mbuf **, struct inpcb *, int *, int *,
|
int ip6_ipsec_output(struct mbuf **, struct inpcb *, int *, int *,
|
||||||
struct ifnet **, struct secpolicy **sp);
|
struct ifnet **, struct secpolicy **sp);
|
||||||
|
#if 0
|
||||||
|
int ip6_ipsec_mtu(struct mbuf *);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user