svn commit: r190233 - head/sys/netinet

Juli Mallett jmallett at FreeBSD.org
Sat Mar 21 17:45:48 PDT 2009


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:


More information about the svn-src-all mailing list