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:
parent
9129d539e2
commit
7691747aac
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user