From 7691747aac18af3564c2e16959b197ac8eb4dc1b Mon Sep 17 00:00:00 2001 From: Philip Paeps Date: Wed, 12 Oct 2005 09:24:18 +0000 Subject: [PATCH] Unbreak the net.inet6.tcp6.getcred sysctl. This makes inetd/auth work again in IPv6 setups. Pointy hat to: ume/KAME --- sys/netinet/tcp_subr.c | 6 +++--- sys/netinet/tcp_timewait.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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;