diff options
author | jmallett <jmallett@FreeBSD.org> | 2009-03-22 00:45:47 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2009-03-22 00:45:47 +0000 |
commit | 4cae140c4140b2da6ae85f64a1fedcfef07e51bc (patch) | |
tree | 85b76e3b0cd9a6677b179d6c740c897e9724b201 /sys/netinet | |
parent | 47ec0506fb9b2a109368d81837a7ce365feddc19 (diff) | |
download | FreeBSD-src-4cae140c4140b2da6ae85f64a1fedcfef07e51bc.zip FreeBSD-src-4cae140c4140b2da6ae85f64a1fedcfef07e51bc.tar.gz |
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
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_subr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index cabdbad..cda8817 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -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: |