Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Remove this multicast check. Multicast packets a...



details:   https://anonhg.NetBSD.org/src/rev/dbcb6f34f9ab
branches:  trunk
changeset: 359472:dbcb6f34f9ab
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Feb 12 08:03:42 2018 +0000

description:
Remove this multicast check. Multicast packets are already dropped at
the beginning of the function.

diffstat:

 sys/netinet/tcp_input.c |  23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)

diffs (45 lines):

diff -r 3abbde3f290e -r dbcb6f34f9ab sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c   Mon Feb 12 02:15:31 2018 +0000
+++ b/sys/netinet/tcp_input.c   Mon Feb 12 08:03:42 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_input.c,v 1.375 2018/02/09 14:06:17 maxv Exp $     */
+/*     $NetBSD: tcp_input.c,v 1.376 2018/02/12 08:03:42 maxv Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.375 2018/02/09 14:06:17 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.376 2018/02/12 08:03:42 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -3043,24 +3043,9 @@
         */
        if (tiflags & TH_RST)
                goto drop;
-
-       switch (af) {
-#ifdef INET6
-       case AF_INET6:
-               /* For following calls to tcp_respond */
-               if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst))
-                       goto drop;
-               break;
-#endif /* INET6 */
-       case AF_INET:
-               if (IN_MULTICAST(ip->ip_dst.s_addr) ||
-                   in_broadcast(ip->ip_dst, m_get_rcvif_NOMPSAFE(m)))
-                       goto drop;
-       }
-
-       if (tiflags & TH_ACK)
+       if (tiflags & TH_ACK) {
                (void)tcp_respond(tp, m, m, th, (tcp_seq)0, th->th_ack, TH_RST);
-       else {
+       } else {
                if (tiflags & TH_SYN)
                        tlen++;
                (void)tcp_respond(tp, m, m, th, th->th_seq + tlen, (tcp_seq)0,



Home | Main Index | Thread Index | Old Index