Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_subr.c
Show First 20 Lines • Show All 1,949 Lines • ▼ Show 20 Lines | ipsec_hdrsiz_tcp(struct tcpcb *tp) | ||||
struct mbuf *m; | struct mbuf *m; | ||||
size_t hdrsiz; | size_t hdrsiz; | ||||
struct ip *ip; | struct ip *ip; | ||||
#ifdef INET6 | #ifdef INET6 | ||||
struct ip6_hdr *ip6; | struct ip6_hdr *ip6; | ||||
#endif | #endif | ||||
struct tcphdr *th; | 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); | return (0); | ||||
m = m_gethdr(M_NOWAIT, MT_DATA); | m = m_gethdr(M_NOWAIT, MT_DATA); | ||||
if (!m) | if (!m) | ||||
return (0); | return (0); | ||||
#ifdef INET6 | #ifdef INET6 | ||||
if ((inp->inp_vflag & INP_IPV6) != 0) { | if ((inp->inp_vflag & INP_IPV6) != 0) { | ||||
ip6 = mtod(m, struct ip6_hdr *); | ip6 = mtod(m, struct ip6_hdr *); | ||||
▲ Show 20 Lines • Show All 558 Lines • Show Last 20 Lines |