diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 6a3068a38089..144070c5a9bf 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1035,7 +1035,6 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS) { struct xucred xuc; struct sockaddr_in6 addrs[2]; - struct in6_addr a6[2]; struct inpcb *inp; int error, mapped = 0; @@ -1065,8 +1064,9 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS) addrs[0].sin6_port, 0, NULL); else - inp = in6_pcblookup_hash(&tcbinfo, &a6[1], addrs[1].sin6_port, - &a6[0], addrs[0].sin6_port, 0, NULL); + inp = in6_pcblookup_hash(&tcbinfo, + &addrs[1].sin6_addr, addrs[1].sin6_port, + &addrs[0].sin6_addr, addrs[0].sin6_port, 0, NULL); if (inp == NULL) { error = ENOENT; goto outunlocked; diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 6a3068a38089..144070c5a9bf 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -1035,7 +1035,6 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS) { struct xucred xuc; struct sockaddr_in6 addrs[2]; - struct in6_addr a6[2]; struct inpcb *inp; int error, mapped = 0; @@ -1065,8 +1064,9 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS) addrs[0].sin6_port, 0, NULL); else - inp = in6_pcblookup_hash(&tcbinfo, &a6[1], addrs[1].sin6_port, - &a6[0], addrs[0].sin6_port, 0, NULL); + inp = in6_pcblookup_hash(&tcbinfo, + &addrs[1].sin6_addr, addrs[1].sin6_port, + &addrs[0].sin6_addr, addrs[0].sin6_port, 0, NULL); if (inp == NULL) { error = ENOENT; goto outunlocked;