From owner-svn-src-head@FreeBSD.ORG Sat Feb 28 22:58:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09ECD106564A; Sat, 28 Feb 2009 22:58:53 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D23998FC23; Sat, 28 Feb 2009 22:58:52 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SMwquH023975; Sat, 28 Feb 2009 22:58:52 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SMwq6n023974; Sat, 28 Feb 2009 22:58:52 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200902282258.n1SMwq6n023974@svn.freebsd.org> From: Robert Watson Date: Sat, 28 Feb 2009 22:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189196 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 22:58:53 -0000 Author: rwatson Date: Sat Feb 28 22:58:52 2009 New Revision: 189196 URL: http://svn.freebsd.org/changeset/base/189196 Log: Remove unreachable code for generating RST segments from tcp_twcheck(); this code became stale when T/TCP support was removed. Discussed with: bz, sam MFC after: 1 month Modified: head/sys/netinet/tcp_timewait.c Modified: head/sys/netinet/tcp_timewait.c ============================================================================== --- head/sys/netinet/tcp_timewait.c Sat Feb 28 22:07:15 2009 (r189195) +++ head/sys/netinet/tcp_timewait.c Sat Feb 28 22:58:52 2009 (r189196) @@ -333,11 +333,6 @@ tcp_twcheck(struct inpcb *inp, struct tc struct tcptw *tw; int thflags; tcp_seq seq; -#ifdef INET6 - int isipv6 = (mtod(m, struct ip *)->ip_v == 6) ? 1 : 0; -#else - const int isipv6 = 0; -#endif /* tcbinfo lock required for tcp_twclose(), tcp_tw_2msl_reset(). */ INP_INFO_WLOCK_ASSERT(&V_tcbinfo); @@ -417,46 +412,6 @@ tcp_twcheck(struct inpcb *inp, struct tc if (thflags != TH_ACK || tlen != 0 || th->th_seq != tw->rcv_nxt || th->th_ack != tw->snd_nxt) tcp_twrespond(tw, TH_ACK); - goto drop; - - /* - * Generate a RST, dropping incoming segment. - * Make ACK acceptable to originator of segment. - * Don't bother to respond if destination was broadcast/multicast. - */ - if (m->m_flags & (M_BCAST|M_MCAST)) - goto drop; - if (isipv6) { -#ifdef INET6 - struct ip6_hdr *ip6; - - /* IPv6 anycast check is done at tcp6_input() */ - ip6 = mtod(m, struct ip6_hdr *); - if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || - IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) - goto drop; -#endif - } else { - struct ip *ip; - - ip = mtod(m, struct ip *); - if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || - IN_MULTICAST(ntohl(ip->ip_src.s_addr)) || - ip->ip_src.s_addr == htonl(INADDR_BROADCAST) || - in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) - goto drop; - } - if (thflags & TH_ACK) { - tcp_respond(NULL, - mtod(m, void *), th, m, 0, th->th_ack, TH_RST); - } else { - seq = th->th_seq + (thflags & TH_SYN ? 1 : 0); - tcp_respond(NULL, - mtod(m, void *), th, m, seq, 0, TH_RST|TH_ACK); - } - INP_WUNLOCK(inp); - return (0); - drop: INP_WUNLOCK(inp); m_freem(m);