Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Mar 2009 00:45:48 +0000 (UTC)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r190233 - head/sys/netinet
Message-ID:  <200903220045.n2M0jmJ9052026@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmallett
Date: Sun Mar 22 00:45:47 2009
New Revision: 190233
URL: http://svn.freebsd.org/changeset/base/190233

Log:
  Remove local in6_addr variables for local and foreign addresses in sysctl_drop,
  they were passed uninitialized to in6_pcblookup_hash.  Instead, do as is done
  for IPv4 and use the addresses within the sockaddr structure, which are
  correctly populated.
  
  This fixes tcpdrop(8) for IPv6 address pairs.
  
  Reviewed by:	bz

Modified:
  head/sys/netinet/tcp_subr.c

Modified: head/sys/netinet/tcp_subr.c
==============================================================================
--- head/sys/netinet/tcp_subr.c	Sun Mar 22 00:29:48 2009	(r190232)
+++ head/sys/netinet/tcp_subr.c	Sun Mar 22 00:45:47 2009	(r190233)
@@ -2114,7 +2114,6 @@ sysctl_drop(SYSCTL_HANDLER_ARGS)
 	struct sockaddr_in *fin, *lin;
 #ifdef INET6
 	struct sockaddr_in6 *fin6, *lin6;
-	struct in6_addr f6, l6;
 #endif
 	int error;
 
@@ -2174,8 +2173,9 @@ sysctl_drop(SYSCTL_HANDLER_ARGS)
 	switch (addrs[0].ss_family) {
 #ifdef INET6
 	case AF_INET6:
-		inp = in6_pcblookup_hash(&V_tcbinfo, &f6, fin6->sin6_port,
-		    &l6, lin6->sin6_port, 0, NULL);
+		inp = in6_pcblookup_hash(&V_tcbinfo, &fin6->sin6_addr,
+		    fin6->sin6_port, &lin6->sin6_addr, lin6->sin6_port, 0,
+		    NULL);
 		break;
 #endif
 	case AF_INET:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903220045.n2M0jmJ9052026>