| version 1.81, 2001/07/17 02:44:00 |
version 1.82, 2001/07/25 06:05:16 |
| Line 670 udp4_realinput(src, dst, m, off) |
|
| Line 670 udp4_realinput(src, dst, m, off) |
|
| (SO_REUSEPORT|SO_REUSEADDR)) == 0) |
(SO_REUSEPORT|SO_REUSEADDR)) == 0) |
| break; |
break; |
| } |
} |
| |
|
| #if 0 |
|
| if (last == NULL) { |
|
| /* |
|
| * No matching pcb found; discard datagram. |
|
| * (No need to send an ICMP Port Unreachable |
|
| * for a broadcast or multicast datgram.) |
|
| */ |
|
| udpstat.udps_noportbcast++; |
|
| goto bad; |
|
| } |
|
| #endif |
|
| } else { |
} else { |
| /* |
/* |
| * Locate pcb for datagram. |
* Locate pcb for datagram. |
| Line 690 udp4_realinput(src, dst, m, off) |
|
| Line 678 udp4_realinput(src, dst, m, off) |
|
| if (inp == 0) { |
if (inp == 0) { |
| ++udpstat.udps_pcbhashmiss; |
++udpstat.udps_pcbhashmiss; |
| inp = in_pcblookup_bind(&udbtable, *dst4, *dport); |
inp = in_pcblookup_bind(&udbtable, *dst4, *dport); |
| if (inp == 0) { |
if (inp == 0) |
| #if 0 |
|
| struct mbuf *n; |
|
| |
|
| if (m->m_flags & (M_BCAST | M_MCAST)) { |
|
| udpstat.udps_noportbcast++; |
|
| goto bad; |
|
| } |
|
| udpstat.udps_noport++; |
|
| #ifdef IPKDB |
|
| if (checkipkdb(src4, *sport, *dport, m, off, |
|
| m->m_pkthdr.len - off)) { |
|
| /* |
|
| * It was a debugger connect packet, |
|
| * just drop it now |
|
| */ |
|
| goto bad; |
|
| } |
|
| #endif |
|
| if ((n = m_copy(m, 0, M_COPYALL)) != NULL) { |
|
| icmp_error(n, ICMP_UNREACH, |
|
| ICMP_UNREACH_PORT, 0, 0); |
|
| } |
|
| #endif |
|
| return rcvcnt; |
return rcvcnt; |
| } |
|
| } |
} |
| |
|
| udp4_sendup(m, off, (struct sockaddr *)src, inp->inp_socket); |
udp4_sendup(m, off, (struct sockaddr *)src, inp->inp_socket); |
| Line 851 udp6_realinput(af, src, dst, m, off) |
|
| Line 815 udp6_realinput(af, src, dst, m, off) |
|
| (SO_REUSEPORT|SO_REUSEADDR)) == 0) |
(SO_REUSEPORT|SO_REUSEADDR)) == 0) |
| break; |
break; |
| } |
} |
| |
|
| #if 0 |
|
| if (last == NULL) { |
|
| /* |
|
| * No matching pcb found; discard datagram. |
|
| * (No need to send an ICMP Port Unreachable |
|
| * for a broadcast or multicast datgram.) |
|
| */ |
|
| switch (af) { |
|
| case AF_INET: |
|
| udpstat.udps_noportbcast++; |
|
| break; |
|
| case AF_INET6: |
|
| udp6stat.udp6s_noportmcast++; |
|
| break; |
|
| } |
|
| goto bad; |
|
| } |
|
| #endif |
|
| } else { |
} else { |
| /* |
/* |
| * Locate pcb for datagram. |
* Locate pcb for datagram. |
| Line 879 udp6_realinput(af, src, dst, m, off) |
|
| Line 824 udp6_realinput(af, src, dst, m, off) |
|
| if (in6p == 0) { |
if (in6p == 0) { |
| ++udpstat.udps_pcbhashmiss; |
++udpstat.udps_pcbhashmiss; |
| in6p = in6_pcblookup_bind(&udb6, &dst6, dport, 0); |
in6p = in6_pcblookup_bind(&udb6, &dst6, dport, 0); |
| if (in6p == 0) { |
if (in6p == 0) |
| #if 0 |
|
| struct mbuf *n; |
|
| n = m_copy(m, 0, M_COPYALL); |
|
| switch (af) { |
|
| case AF_INET: |
|
| if (m->m_flags & (M_BCAST | M_MCAST)) { |
|
| udpstat.udps_noportbcast++; |
|
| goto bad; |
|
| } |
|
| udpstat.udps_noport++; |
|
| if (n != NULL) |
|
| icmp_error(n, ICMP_UNREACH, |
|
| ICMP_UNREACH_PORT, 0, 0); |
|
| break; |
|
| case AF_INET6: |
|
| if (m->m_flags & M_MCAST) { |
|
| udp6stat.udp6s_noportmcast++; |
|
| goto bad; |
|
| } |
|
| udp6stat.udp6s_noport++; |
|
| if (n != NULL) |
|
| icmp6_error(n, ICMP6_DST_UNREACH, |
|
| ICMP6_DST_UNREACH_NOPORT, 0); |
|
| break; |
|
| } |
|
| #endif |
|
| |
|
| return rcvcnt; |
return rcvcnt; |
| } |
|
| } |
} |
| |
|
| udp6_sendup(m, off, (struct sockaddr *)src, in6p->in6p_socket); |
udp6_sendup(m, off, (struct sockaddr *)src, in6p->in6p_socket); |