g/c #if 0'ed fragment. sync with kame.

This commit is contained in:
itojun 2001-07-25 06:05:16 +00:00
parent 36ced12645
commit 49f2e6958f
1 changed files with 3 additions and 86 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: udp_usrreq.c,v 1.81 2001/07/17 02:44:00 enami Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.82 2001/07/25 06:05:16 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -670,18 +670,6 @@ udp4_realinput(src, dst, m, off)
(SO_REUSEPORT|SO_REUSEADDR)) == 0)
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 {
/*
* Locate pcb for datagram.
@ -690,33 +678,9 @@ udp4_realinput(src, dst, m, off)
if (inp == 0) {
++udpstat.udps_pcbhashmiss;
inp = in_pcblookup_bind(&udbtable, *dst4, *dport);
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
if (inp == 0)
return rcvcnt;
}
}
udp4_sendup(m, off, (struct sockaddr *)src, inp->inp_socket);
rcvcnt++;
@ -851,25 +815,6 @@ udp6_realinput(af, src, dst, m, off)
(SO_REUSEPORT|SO_REUSEADDR)) == 0)
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 {
/*
* Locate pcb for datagram.
@ -879,37 +824,9 @@ udp6_realinput(af, src, dst, m, off)
if (in6p == 0) {
++udpstat.udps_pcbhashmiss;
in6p = in6_pcblookup_bind(&udb6, &dst6, dport, 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
if (in6p == 0)
return rcvcnt;
}
}
udp6_sendup(m, off, (struct sockaddr *)src, in6p->in6p_socket);
rcvcnt++;