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
This commit is contained in:
parent
15c48b9a20
commit
34f27ade44
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user