diff options
author | shin <shin@FreeBSD.org> | 2000-01-15 14:56:38 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-01-15 14:56:38 +0000 |
commit | e7b807d1e39b437dd36a6de181d9c2d3849a440f (patch) | |
tree | 87035964194ab67449df445329b7c03812001b0c /sys/netinet6/ipsec.c | |
parent | e41bceb344bd708fb10d2bc13ac5f056f4baae42 (diff) | |
download | FreeBSD-src-e7b807d1e39b437dd36a6de181d9c2d3849a440f.zip FreeBSD-src-e7b807d1e39b437dd36a6de181d9c2d3849a440f.tar.gz |
Fixed the problem that IPsec connection hangs when bigger data is sent.
-opt_ipsec.h was missing on some tcp files (sorry for basic mistake)
-made buildable as above fix
-also added some missing IPv4 mapped IPv6 addr consideration into
ipsec4_getpolicybysock
Diffstat (limited to 'sys/netinet6/ipsec.c')
-rw-r--r-- | sys/netinet6/ipsec.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/netinet6/ipsec.c b/sys/netinet6/ipsec.c index 007df21..d9cf133 100644 --- a/sys/netinet6/ipsec.c +++ b/sys/netinet6/ipsec.c @@ -219,22 +219,20 @@ ipsec4_getpolicybysock(m, dir, so, error) if (m == NULL || so == NULL || error == NULL) panic("ipsec4_getpolicybysock: NULL pointer was passed.\n"); - switch (so->so_proto->pr_domain->dom_family) { - case AF_INET: + if ((sotoinpcb(so)->inp_vflag & INP_IPV4) != 0) { /* set spidx in pcb */ ipsec4_setspidx_inpcb(m, sotoinpcb(so)); pcbsp = sotoinpcb(so)->inp_sp; - break; + } #ifdef INET6 - case AF_INET6: + else if ((sotoinpcb(so)->inp_vflag & INP_IPV6) != 0) { /* set spidx in pcb */ ipsec6_setspidx_in6pcb(m, sotoin6pcb(so)); pcbsp = sotoin6pcb(so)->in6p_sp; - break; + } #endif - default: + else panic("ipsec4_getpolicybysock: unsupported address family\n"); - } /* sanity check */ if (pcbsp == NULL) |