Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet g/c #if 0'ed fragment. sync with kame.
details: https://anonhg.NetBSD.org/src/rev/dcf6efed506d
branches: trunk
changeset: 513152:dcf6efed506d
user: itojun <itojun%NetBSD.org@localhost>
date: Wed Jul 25 06:05:16 2001 +0000
description:
g/c #if 0'ed fragment. sync with kame.
diffstat:
sys/netinet/udp_usrreq.c | 89 +----------------------------------------------
1 files changed, 3 insertions(+), 86 deletions(-)
diffs (126 lines):
diff -r cc6bf7efc671 -r dcf6efed506d sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c Wed Jul 25 05:17:50 2001 +0000
+++ b/sys/netinet/udp_usrreq.c Wed Jul 25 06:05:16 2001 +0000
@@ -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 @@
(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,32 +678,8 @@
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);
@@ -851,25 +815,6 @@
(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,36 +824,8 @@
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);
Home |
Main Index |
Thread Index |
Old Index