Commit 9c3aef25 authored by Stefan Metzmacher's avatar Stefan Metzmacher
Browse files

gensec_krb5: restore ipv6 support

We need to offer as much space we have in order to
get the address out of tsocket_address_bsd_sockaddr().

This fixes a regression in commit
43c808f2

.
Signed-off-by: Stefan Metzmacher's avatarStefan Metzmacher <metze@samba.org>
parent b3ee034b
Pipeline #330735646 passed with stages
in 126 minutes and 27 seconds
......@@ -149,8 +149,9 @@ static NTSTATUS gensec_krb5_start(struct gensec_security *gensec_security, bool
struct samba_sockaddr addr;
bool ok;
addr.sa_socklen = sizeof(addr.u);
sockaddr_ret = tsocket_address_bsd_sockaddr(
tlocal_addr, &addr.u.sa, sizeof(addr.u.sa));
tlocal_addr, &addr.u.sa, addr.sa_socklen);
if (sockaddr_ret < 0) {
talloc_free(gensec_krb5_state);
return NT_STATUS_INTERNAL_ERROR;
......@@ -170,8 +171,9 @@ static NTSTATUS gensec_krb5_start(struct gensec_security *gensec_security, bool
struct samba_sockaddr addr;
bool ok;
addr.sa_socklen = sizeof(addr.u);
sockaddr_ret = tsocket_address_bsd_sockaddr(
tremote_addr, &addr.u.sa, sizeof(addr.u.sa));
tremote_addr, &addr.u.sa, addr.sa_socklen);
if (sockaddr_ret < 0) {
talloc_free(gensec_krb5_state);
return NT_STATUS_INTERNAL_ERROR;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment