| version 1.160, 2007/06/27 20:38:32 |
version 1.160.6.2, 2007/12/03 16:15:11 |
| Line 617 udp4_sendup(struct mbuf *m, int off /* o |
|
| Line 617 udp4_sendup(struct mbuf *m, int off /* o |
|
| /* check AH/ESP integrity. */ |
/* check AH/ESP integrity. */ |
| if (so != NULL && ipsec4_in_reject_so(m, so)) { |
if (so != NULL && ipsec4_in_reject_so(m, so)) { |
| ipsecstat.in_polvio++; |
ipsecstat.in_polvio++; |
| if ((n = m_copy(m, 0, M_COPYALL)) != NULL) |
if ((n = m_copypacket(m, M_DONTWAIT)) != NULL) |
| icmp_error(n, ICMP_UNREACH, ICMP_UNREACH_ADMIN_PROHIBIT, |
icmp_error(n, ICMP_UNREACH, ICMP_UNREACH_ADMIN_PROHIBIT, |
| 0, 0); |
0, 0); |
| return; |
return; |
| } |
} |
| #endif /*IPSEC*/ |
#endif /*IPSEC*/ |
| |
|
| if ((n = m_copy(m, 0, M_COPYALL)) != NULL) { |
if ((n = m_copypacket(m, M_DONTWAIT)) != NULL) { |
| if (inp && (inp->inp_flags & INP_CONTROLOPTS |
if (inp && (inp->inp_flags & INP_CONTROLOPTS |
| || so->so_options & SO_TIMESTAMP)) { |
|| so->so_options & SO_TIMESTAMP)) { |
| struct ip *ip = mtod(n, struct ip *); |
struct ip *ip = mtod(n, struct ip *); |
| Line 664 udp6_sendup(struct mbuf *m, int off /* o |
|
| Line 664 udp6_sendup(struct mbuf *m, int off /* o |
|
| /* check AH/ESP integrity. */ |
/* check AH/ESP integrity. */ |
| if (so != NULL && ipsec6_in_reject_so(m, so)) { |
if (so != NULL && ipsec6_in_reject_so(m, so)) { |
| ipsec6stat.in_polvio++; |
ipsec6stat.in_polvio++; |
| if ((n = m_copy(m, 0, M_COPYALL)) != NULL) |
if ((n = m_copypacket(m, M_DONTWAIT)) != NULL) |
| icmp6_error(n, ICMP6_DST_UNREACH, |
icmp6_error(n, ICMP6_DST_UNREACH, |
| ICMP6_DST_UNREACH_ADMIN, 0); |
ICMP6_DST_UNREACH_ADMIN, 0); |
| return; |
return; |
| } |
} |
| #endif /*IPSEC*/ |
#endif /*IPSEC*/ |
| |
|
| if ((n = m_copy(m, 0, M_COPYALL)) != NULL) { |
if ((n = m_copypacket(m, M_DONTWAIT)) != NULL) { |
| if (in6p && (in6p->in6p_flags & IN6P_CONTROLOPTS |
if (in6p && (in6p->in6p_flags & IN6P_CONTROLOPTS |
| || in6p->in6p_socket->so_options & SO_TIMESTAMP)) { |
|| in6p->in6p_socket->so_options & SO_TIMESTAMP)) { |
| struct ip6_hdr *ip6 = mtod(n, struct ip6_hdr *); |
struct ip6_hdr *ip6 = mtod(n, struct ip6_hdr *); |
| Line 1029 udp_ctloutput(int op, struct socket *so, |
|
| Line 1029 udp_ctloutput(int op, struct socket *so, |
|
| |
|
| switch (optname) { |
switch (optname) { |
| case UDP_ENCAP: |
case UDP_ENCAP: |
| if (m == NULL || m->m_len < sizeof (int)) { |
if (m == NULL || m->m_len != sizeof(int)) { |
| error = EINVAL; |
error = EINVAL; |
| break; |
break; |
| } |
} |