Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/tcp_input.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/tcp_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.136 retrieving revision 1.137 diff -u -p -r1.136 -r1.137 --- src/sys/netinet/tcp_input.c 2002/03/12 04:36:47 1.136 +++ src/sys/netinet/tcp_input.c 2002/03/19 14:35:20 1.137 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.136 2002/03/12 04:36:47 itojun Exp $ */ +/* $NetBSD: tcp_input.c,v 1.137 2002/03/19 14:35:20 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -152,7 +152,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.136 2002/03/12 04:36:47 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.137 2002/03/19 14:35:20 christos Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -700,7 +700,9 @@ tcp_input(m, va_alist) * Make sure destination address is not multicast. * Source address checked in ip_input(). */ - if (IN_MULTICAST(ip->ip_dst.s_addr)) { + if (IN_MULTICAST(ip->ip_dst.s_addr) || + in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) { + /* XXX stat */ goto drop; } @@ -2247,6 +2249,11 @@ dropwithreset: */ if (tiflags & TH_RST) goto drop; + + if (IN_MULTICAST(ip->ip_dst.s_addr) || + in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) + goto drop; + { /* * need to recover version # field, which was overwritten on