| version 1.66, 2000/03/30 13:25:11 |
version 1.66.4.2, 2000/12/13 21:24:57 |
| Line 232 udp_input(m, va_alist) |
|
| Line 232 udp_input(m, va_alist) |
|
| */ |
*/ |
| len = ntohs((u_int16_t)uh->uh_ulen); |
len = ntohs((u_int16_t)uh->uh_ulen); |
| if (ip->ip_len != iphlen + len) { |
if (ip->ip_len != iphlen + len) { |
| if (ip->ip_len < iphlen + len) { |
if (ip->ip_len < iphlen + len || len < sizeof(struct udphdr)) { |
| udpstat.udps_badlen++; |
udpstat.udps_badlen++; |
| goto bad; |
goto bad; |
| } |
} |
| Line 554 udp4_realinput(src, dst, m, off) |
|
| Line 554 udp4_realinput(src, dst, m, off) |
|
| dst4 = &dst->sin_addr; |
dst4 = &dst->sin_addr; |
| dport = &dst->sin_port; |
dport = &dst->sin_port; |
| |
|
| if (IN_MULTICAST(src4->s_addr) || |
if (IN_MULTICAST(dst4->s_addr) || |
| in_broadcast(*dst4, m->m_pkthdr.rcvif)) { |
in_broadcast(*dst4, m->m_pkthdr.rcvif)) { |
| struct inpcb *last; |
struct inpcb *last; |
| /* |
/* |
| Line 721 udp6_realinput(af, src, dst, m, off) |
|
| Line 721 udp6_realinput(af, src, dst, m, off) |
|
| src4 = (struct in_addr *)&src->sin6_addr.s6_addr32[12]; |
src4 = (struct in_addr *)&src->sin6_addr.s6_addr32[12]; |
| |
|
| if (IN6_IS_ADDR_MULTICAST(dst6) |
if (IN6_IS_ADDR_MULTICAST(dst6) |
| || (af == AF_INET && IN_MULTICAST(src4->s_addr))) { |
|| (af == AF_INET && IN_MULTICAST(dst4->s_addr))) { |
| struct in6pcb *last; |
struct in6pcb *last; |
| /* |
/* |
| * Deliver a multicast or broadcast datagram to *all* sockets |
* Deliver a multicast or broadcast datagram to *all* sockets |
| Line 925 udp_input(m, va_alist) |
|
| Line 925 udp_input(m, va_alist) |
|
| */ |
*/ |
| len = ntohs((u_int16_t)uh->uh_ulen); |
len = ntohs((u_int16_t)uh->uh_ulen); |
| if (ip->ip_len != iphlen + len) { |
if (ip->ip_len != iphlen + len) { |
| if (ip->ip_len < iphlen + len) { |
if (ip->ip_len < iphlen + len || len < sizeof(struct udphdr)) { |
| udpstat.udps_badlen++; |
udpstat.udps_badlen++; |
| goto bad; |
goto bad; |
| } |
} |