svn commit: r272299 - head/sys/netinet6
Andrey V. Elsukov
ae at FreeBSD.org
Tue Sep 30 13:15:20 UTC 2014
Author: ae
Date: Tue Sep 30 13:15:19 2014
New Revision: 272299
URL: http://svnweb.freebsd.org/changeset/base/272299
Log:
Remove redundant call to ipsec_getpolicybyaddr().
ipsec_hdrsiz() will call it internally.
Sponsored by: Yandex LLC
Modified:
head/sys/netinet6/ip6_forward.c
Modified: head/sys/netinet6/ip6_forward.c
==============================================================================
--- head/sys/netinet6/ip6_forward.c Tue Sep 30 12:00:50 2014 (r272298)
+++ head/sys/netinet6/ip6_forward.c Tue Sep 30 13:15:19 2014 (r272299)
@@ -422,8 +422,6 @@ again2:
if (mcopy) {
u_long mtu;
#ifdef IPSEC
- struct secpolicy *sp;
- int ipsecerror;
size_t ipsechdrsiz;
#endif /* IPSEC */
@@ -436,15 +434,10 @@ again2:
* case, as we have the outgoing interface for
* encapsulated packet as "rt->rt_ifp".
*/
- sp = ipsec_getpolicybyaddr(mcopy, IPSEC_DIR_OUTBOUND,
- IP_FORWARDING, &ipsecerror);
- if (sp) {
- ipsechdrsiz = ipsec_hdrsiz(mcopy,
- IPSEC_DIR_OUTBOUND, NULL);
- if (ipsechdrsiz < mtu)
- mtu -= ipsechdrsiz;
- }
-
+ ipsechdrsiz = ipsec_hdrsiz(mcopy, IPSEC_DIR_OUTBOUND,
+ NULL);
+ if (ipsechdrsiz < mtu)
+ mtu -= ipsechdrsiz;
/*
* if mtu becomes less than minimum MTU,
* tell minimum MTU (and I'll need to fragment it).
More information about the svn-src-head
mailing list