Unbreak the net.inet6.tcp6.getcred sysctl.

This makes inetd/auth work again in IPv6 setups.

Pointy hat to:	ume/KAME
This commit is contained in:
Philip Paeps 2005-10-12 09:24:18 +00:00
parent 9129d539e2
commit 7691747aac
2 changed files with 6 additions and 6 deletions

View File

@ -1035,7 +1035,6 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
{ {
struct xucred xuc; struct xucred xuc;
struct sockaddr_in6 addrs[2]; struct sockaddr_in6 addrs[2];
struct in6_addr a6[2];
struct inpcb *inp; struct inpcb *inp;
int error, mapped = 0; int error, mapped = 0;
@ -1065,8 +1064,9 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
addrs[0].sin6_port, addrs[0].sin6_port,
0, NULL); 0, NULL);
else else
inp = in6_pcblookup_hash(&tcbinfo, &a6[1], addrs[1].sin6_port, inp = in6_pcblookup_hash(&tcbinfo,
&a6[0], addrs[0].sin6_port, 0, NULL); &addrs[1].sin6_addr, addrs[1].sin6_port,
&addrs[0].sin6_addr, addrs[0].sin6_port, 0, NULL);
if (inp == NULL) { if (inp == NULL) {
error = ENOENT; error = ENOENT;
goto outunlocked; goto outunlocked;

View File

@ -1035,7 +1035,6 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
{ {
struct xucred xuc; struct xucred xuc;
struct sockaddr_in6 addrs[2]; struct sockaddr_in6 addrs[2];
struct in6_addr a6[2];
struct inpcb *inp; struct inpcb *inp;
int error, mapped = 0; int error, mapped = 0;
@ -1065,8 +1064,9 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
addrs[0].sin6_port, addrs[0].sin6_port,
0, NULL); 0, NULL);
else else
inp = in6_pcblookup_hash(&tcbinfo, &a6[1], addrs[1].sin6_port, inp = in6_pcblookup_hash(&tcbinfo,
&a6[0], addrs[0].sin6_port, 0, NULL); &addrs[1].sin6_addr, addrs[1].sin6_port,
&addrs[0].sin6_addr, addrs[0].sin6_port, 0, NULL);
if (inp == NULL) { if (inp == NULL) {
error = ENOENT; error = ENOENT;
goto outunlocked; goto outunlocked;