mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
FAST_IPSEC fixups:
o fix #ifdef typo o must use "bounce functions" when dispatched from the protosw table don't know how this stuff was missed in my testing; must've committed the wrong bits Pointy hat: sam Submitted by: "Doug Ambrisko" <ambrisko@verniernetworks.com>
This commit is contained in:
parent
58fcadfc0f
commit
e8539d32f0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106680
@ -76,12 +76,8 @@
|
||||
#include <netinet6/ipcomp.h>
|
||||
#endif /* IPSEC */
|
||||
|
||||
#ifdef FAST_IPESC
|
||||
#ifdef FAST_IPSEC
|
||||
#include <netipsec/ipsec.h>
|
||||
#define ah4_input ipsec4_common_input
|
||||
#define esp4_input ipsec4_common_input
|
||||
#define ipcomp4_input ipsec4_common_input
|
||||
#define IPSEC
|
||||
#endif /* FAST_IPSEC */
|
||||
|
||||
#ifdef IPXIP
|
||||
@ -162,6 +158,26 @@ struct protosw inetsw[] = {
|
||||
&nousrreqs
|
||||
},
|
||||
#endif /* IPSEC */
|
||||
#ifdef FAST_IPSEC
|
||||
{ SOCK_RAW, &inetdomain, IPPROTO_AH, PR_ATOMIC|PR_ADDR,
|
||||
ah4_input, 0, 0, 0,
|
||||
0,
|
||||
0, 0, 0, 0,
|
||||
&nousrreqs
|
||||
},
|
||||
{ SOCK_RAW, &inetdomain, IPPROTO_ESP, PR_ATOMIC|PR_ADDR,
|
||||
esp4_input, 0, 0, 0,
|
||||
0,
|
||||
0, 0, 0, 0,
|
||||
&nousrreqs
|
||||
},
|
||||
{ SOCK_RAW, &inetdomain, IPPROTO_IPCOMP, PR_ATOMIC|PR_ADDR,
|
||||
ipcomp4_input, 0, 0, 0,
|
||||
0,
|
||||
0, 0, 0, 0,
|
||||
&nousrreqs
|
||||
},
|
||||
#endif /* FAST_IPSEC */
|
||||
{ SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR|PR_LASTHDR,
|
||||
encap4_input, 0, 0, rip_ctloutput,
|
||||
0,
|
||||
|
@ -361,6 +361,9 @@ extern const char *ipsec_logsastr __P((struct secasvar *));
|
||||
extern void ipsec_dumpmbuf __P((struct mbuf *));
|
||||
|
||||
struct m_tag;
|
||||
extern void ah4_input(struct mbuf *m, int off);
|
||||
extern void esp4_input(struct mbuf *m, int off);
|
||||
extern void ipcomp4_input(struct mbuf *m, int off);
|
||||
extern int ipsec4_common_input(struct mbuf *m, ...);
|
||||
extern int ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav,
|
||||
int skip, int protoff, struct m_tag *mt);
|
||||
|
@ -201,6 +201,24 @@ ipsec4_common_input(struct mbuf *m, ...)
|
||||
AF_INET, nxt);
|
||||
}
|
||||
|
||||
void
|
||||
ah4_input(struct mbuf *m, int off)
|
||||
{
|
||||
ipsec4_common_input(m, off, IPPROTO_AH);
|
||||
}
|
||||
|
||||
void
|
||||
esp4_input(struct mbuf *m, int off)
|
||||
{
|
||||
ipsec4_common_input(m, off, IPPROTO_ESP);
|
||||
}
|
||||
|
||||
void
|
||||
ipcomp4_input(struct mbuf *m, int off)
|
||||
{
|
||||
ipsec4_common_input(m, off, IPPROTO_IPCOMP);
|
||||
}
|
||||
|
||||
/*
|
||||
* IPsec input callback for INET protocols.
|
||||
* This routine is called as the transform callback.
|
||||
|
Loading…
Reference in New Issue
Block a user