Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177637625
D3737.1794913257.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D3737.1794913257.diff
View Options
Index: sys/netinet/ip_ipsec.c
===================================================================
--- sys/netinet/ip_ipsec.c
+++ sys/netinet/ip_ipsec.c
@@ -156,8 +156,13 @@
*/
int
ip_ipsec_output(struct mbuf **m, struct inpcb *inp, int *error)
+
{
struct secpolicy *sp;
+
+ if (!key_havesp(IPSEC_DIR_INBOUND))
+ return 0;
+
/*
* Check the security policy (SP) for the packet and, if
* required, do IPsec-related processing. There are two
Index: sys/netinet/tcp_subr.c
===================================================================
--- sys/netinet/tcp_subr.c
+++ sys/netinet/tcp_subr.c
@@ -1955,7 +1955,8 @@
#endif
struct tcphdr *th;
- if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL))
+ if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL) ||
+ (!key_havesp(IPSEC_DIR_OUTBOUND)))
return (0);
m = m_gethdr(M_NOWAIT, MT_DATA);
if (!m)
Index: sys/netipsec/ipsec.c
===================================================================
--- sys/netipsec/ipsec.c
+++ sys/netipsec/ipsec.c
@@ -1276,6 +1276,9 @@
int error;
int result;
+ if (!key_havesp(IPSEC_DIR_INBOUND))
+ return 0;
+
IPSEC_ASSERT(m != NULL, ("null mbuf"));
/* Get SP for this packet. */
@@ -1403,6 +1406,9 @@
int error;
size_t size;
+ if (!key_havesp(dir))
+ return 0;
+
IPSEC_ASSERT(m != NULL, ("null mbuf"));
/* Get SP for this packet. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 17, 11:00 AM (21 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41798578
Default Alt Text
D3737.1794913257.diff (1 KB)
Attached To
Mode
D3737: Replace the fastforward path with tryforward which does not require a sysctl and will always be on. The former split between default and fast forwarding is removed by this commit while preserving the ability to use all network stack features.
Attached
Detach File
Event Timeline