version 1.66, 2000/03/30 13:25:11 |
version 1.66.4.3, 2000/12/15 03:29:16 |
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 703 udp6_realinput(af, src, dst, m, off) |
|
Line 703 udp6_realinput(af, src, dst, m, off) |
|
u_int16_t *sport, *dport; |
u_int16_t *sport, *dport; |
int rcvcnt; |
int rcvcnt; |
struct in6_addr *src6, *dst6; |
struct in6_addr *src6, *dst6; |
struct in_addr *src4; |
struct in_addr *dst4; |
struct in6pcb *in6p; |
struct in6pcb *in6p; |
|
|
rcvcnt = 0; |
rcvcnt = 0; |
Line 718 udp6_realinput(af, src, dst, m, off) |
|
Line 718 udp6_realinput(af, src, dst, m, off) |
|
sport = &src->sin6_port; |
sport = &src->sin6_port; |
dst6 = &dst->sin6_addr; |
dst6 = &dst->sin6_addr; |
dport = &dst->sin6_port; |
dport = &dst->sin6_port; |
src4 = (struct in_addr *)&src->sin6_addr.s6_addr32[12]; |
dst4 = (struct in_addr *)&dst->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; |
} |
} |