Date: Fri, 25 Jan 2013 20:45:24 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245916 - head/sys/netinet Message-ID: <201301252045.r0PKjOAP014402@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <netinet/in.h> #include <netinet/in_pcb.h> #include <netinet/in_var.h> +#include <netinet6/in6_pcb.h> #include <netinet6/nd6.h> #define TCPSTATES #include <netinet/tcp.h> @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301252045.r0PKjOAP014402>