From owner-svn-src-head@FreeBSD.ORG Fri Jan 25 20:45:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 13CDF6D2; Fri, 25 Jan 2013 20:45:25 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 06BB8866; Fri, 25 Jan 2013 20:45:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0PKjOdB014403; Fri, 25 Jan 2013 20:45:24 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0PKjOAP014402; Fri, 25 Jan 2013 20:45:24 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301252045.r0PKjOAP014402@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 25 Jan 2013 20:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245916 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 25 Jan 2013 20:45:25 -0000 Author: np Date: Fri Jan 25 20:45:24 2013 New Revision: 245916 URL: http://svnweb.freebsd.org/changeset/base/245916 Log: Teach toe_4tuple_check() to deal with IPv6 4-tuples too. Reviewed by: bz@ Modified: head/sys/netinet/toecore.c Modified: head/sys/netinet/toecore.c ============================================================================== --- head/sys/netinet/toecore.c Fri Jan 25 20:23:33 2013 (r245915) +++ head/sys/netinet/toecore.c Fri Jan 25 20:45:24 2013 (r245916) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define TCPSTATES #include @@ -355,11 +356,14 @@ toe_4tuple_check(struct in_conninfo *inc { struct inpcb *inp; - if (inc->inc_flags & INC_ISIPV6) - return (ENOSYS); /* XXX: implement */ - - inp = in_pcblookup(&V_tcbinfo, inc->inc_faddr, inc->inc_fport, - inc->inc_laddr, inc->inc_lport, INPLOOKUP_WLOCKPCB, ifp); + if (inc->inc_flags & INC_ISIPV6) { + inp = in6_pcblookup(&V_tcbinfo, &inc->inc6_faddr, + inc->inc_fport, &inc->inc6_laddr, inc->inc_lport, + INPLOOKUP_WLOCKPCB, ifp); + } else { + inp = in_pcblookup(&V_tcbinfo, inc->inc_faddr, inc->inc_fport, + inc->inc_laddr, inc->inc_lport, INPLOOKUP_WLOCKPCB, ifp); + } if (inp != NULL) { INP_WLOCK_ASSERT(inp);