| version 1.60, 2000/02/02 23:28:09 |
version 1.61, 2000/02/11 10:43:36 |
| Line 305 udp_input(m, va_alist) |
|
| Line 305 udp_input(m, va_alist) |
|
| #endif |
#endif |
| |
|
| if (n == 0) { |
if (n == 0) { |
| udpstat.udps_noport++; |
|
| if (m->m_flags & (M_BCAST | M_MCAST)) { |
if (m->m_flags & (M_BCAST | M_MCAST)) { |
| udpstat.udps_noportbcast++; |
udpstat.udps_noportbcast++; |
| goto bad; |
goto bad; |
| } |
} |
| |
udpstat.udps_noport++; |
| #if NIPKDB > 0 |
#if NIPKDB > 0 |
| if (checkipkdb(&ip->ip_src, uh->uh_sport, uh->uh_dport, |
if (checkipkdb(&ip->ip_src, uh->uh_sport, uh->uh_dport, |
| m, iphlen + sizeof(struct udphdr), |
m, iphlen + sizeof(struct udphdr), |
| Line 433 udp6_input(mp, offp, proto) |
|
| Line 433 udp6_input(mp, offp, proto) |
|
| dst.sin6_port = uh->uh_dport; |
dst.sin6_port = uh->uh_dport; |
| |
|
| if (udp6_realinput(AF_INET6, &src, &dst, m, off) == 0) { |
if (udp6_realinput(AF_INET6, &src, &dst, m, off) == 0) { |
| udp6stat.udp6s_noport++; |
|
| if (m->m_flags & M_MCAST) { |
if (m->m_flags & M_MCAST) { |
| udp6stat.udp6s_noportmcast++; |
udp6stat.udp6s_noportmcast++; |
| goto bad; |
goto bad; |
| } |
} |
| |
udp6stat.udp6s_noport++; |
| icmp6_error(m, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOPORT, 0); |
icmp6_error(m, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOPORT, 0); |
| m = NULL; |
m = NULL; |
| } |
} |
| Line 638 udp4_realinput(src, dst, m, off) |
|
| Line 638 udp4_realinput(src, dst, m, off) |
|
| * (No need to send an ICMP Port Unreachable |
* (No need to send an ICMP Port Unreachable |
| * for a broadcast or multicast datgram.) |
* for a broadcast or multicast datgram.) |
| */ |
*/ |
| udpstat.udps_noport++; |
|
| udpstat.udps_noportbcast++; |
udpstat.udps_noportbcast++; |
| goto bad; |
goto bad; |
| } |
} |
| Line 655 udp4_realinput(src, dst, m, off) |
|
| Line 654 udp4_realinput(src, dst, m, off) |
|
| #if 0 |
#if 0 |
| struct mbuf *n; |
struct mbuf *n; |
| |
|
| udpstat.udps_noport++; |
|
| if (m->m_flags & (M_BCAST | M_MCAST)) { |
if (m->m_flags & (M_BCAST | M_MCAST)) { |
| udpstat.udps_noportbcast++; |
udpstat.udps_noportbcast++; |
| goto bad; |
goto bad; |
| } |
} |
| |
udpstat.udps_noport++; |
| #if NIPKDB > 0 |
#if NIPKDB > 0 |
| if (checkipkdb(src4, *sport, *dport, m, off, |
if (checkipkdb(src4, *sport, *dport, m, off, |
| m->m_pkthdr.len - off)) { |
m->m_pkthdr.len - off)) { |
| Line 821 udp6_realinput(af, src, dst, m, off) |
|
| Line 820 udp6_realinput(af, src, dst, m, off) |
|
| */ |
*/ |
| switch (af) { |
switch (af) { |
| case AF_INET: |
case AF_INET: |
| udpstat.udps_noport++; |
|
| udpstat.udps_noportbcast++; |
udpstat.udps_noportbcast++; |
| break; |
break; |
| case AF_INET6: |
case AF_INET6: |
| udp6stat.udp6s_noport++; |
|
| udp6stat.udp6s_noportmcast++; |
udp6stat.udp6s_noportmcast++; |
| break; |
break; |
| } |
} |
| Line 847 udp6_realinput(af, src, dst, m, off) |
|
| Line 844 udp6_realinput(af, src, dst, m, off) |
|
| n = m_copy(m, 0, M_COPYALL); |
n = m_copy(m, 0, M_COPYALL); |
| switch (af) { |
switch (af) { |
| case AF_INET: |
case AF_INET: |
| udpstat.udps_noport++; |
|
| if (m->m_flags & (M_BCAST | M_MCAST)) { |
if (m->m_flags & (M_BCAST | M_MCAST)) { |
| udpstat.udps_noportbcast++; |
udpstat.udps_noportbcast++; |
| goto bad; |
goto bad; |
| } |
} |
| |
udpstat.udps_noport++; |
| if (n != NULL) |
if (n != NULL) |
| icmp_error(n, ICMP_UNREACH, |
icmp_error(n, ICMP_UNREACH, |
| ICMP_UNREACH_PORT, 0, 0); |
ICMP_UNREACH_PORT, 0, 0); |
| break; |
break; |
| case AF_INET6: |
case AF_INET6: |
| udp6stat.udp6s_noport++; |
|
| if (m->m_flags & M_MCAST) { |
if (m->m_flags & M_MCAST) { |
| udp6stat.udp6s_noportmcast++; |
udp6stat.udp6s_noportmcast++; |
| goto bad; |
goto bad; |
| } |
} |
| |
udp6stat.udp6s_noport++; |
| if (n != NULL) |
if (n != NULL) |
| icmp6_error(n, ICMP6_DST_UNREACH, |
icmp6_error(n, ICMP6_DST_UNREACH, |
| ICMP6_DST_UNREACH_NOPORT, 0); |
ICMP6_DST_UNREACH_NOPORT, 0); |
| Line 1075 udp_input(m, va_alist) |
|
| Line 1072 udp_input(m, va_alist) |
|
| * (No need to send an ICMP Port Unreachable |
* (No need to send an ICMP Port Unreachable |
| * for a broadcast or multicast datgram.) |
* for a broadcast or multicast datgram.) |
| */ |
*/ |
| udpstat.udps_noport++; |
|
| udpstat.udps_noportbcast++; |
udpstat.udps_noportbcast++; |
| goto bad; |
goto bad; |
| } |
} |
| Line 1109 udp_input(m, va_alist) |
|
| Line 1105 udp_input(m, va_alist) |
|
| ++udpstat.udps_pcbhashmiss; |
++udpstat.udps_pcbhashmiss; |
| inp = in_pcblookup_bind(&udbtable, ip->ip_dst, uh->uh_dport); |
inp = in_pcblookup_bind(&udbtable, ip->ip_dst, uh->uh_dport); |
| if (inp == 0) { |
if (inp == 0) { |
| udpstat.udps_noport++; |
|
| if (m->m_flags & (M_BCAST | M_MCAST)) { |
if (m->m_flags & (M_BCAST | M_MCAST)) { |
| udpstat.udps_noportbcast++; |
udpstat.udps_noportbcast++; |
| goto bad; |
goto bad; |
| } |
} |
| |
udpstat.udps_noport++; |
| *ip = save_ip; |
*ip = save_ip; |
| #if NIPKDB > 0 |
#if NIPKDB > 0 |
| if (checkipkdb(&ip->ip_src, |
if (checkipkdb(&ip->ip_src, |