mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s4-ipv6: fill in family when initialising from sockaddr
Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Mon Jun 6 05:35:36 CEST 2011 on sn-devel-104
This commit is contained in:
parent
66aec3cf67
commit
d168a5e703
@ -503,7 +503,19 @@ _PUBLIC_ struct socket_address *socket_address_from_sockaddr(TALLOC_CTX *mem_ctx
|
||||
if (!addr) {
|
||||
return NULL;
|
||||
}
|
||||
addr->family = NULL;
|
||||
switch (sockaddr->sa_family) {
|
||||
case AF_INET:
|
||||
addr->family = "ipv4";
|
||||
break;
|
||||
#ifdef HAVE_IPV6
|
||||
case AF_INET6:
|
||||
addr->family = "ipv6";
|
||||
break;
|
||||
#endif
|
||||
case AF_UNIX:
|
||||
addr->family = "unix";
|
||||
break;
|
||||
}
|
||||
addr->addr = NULL;
|
||||
addr->port = 0;
|
||||
addr->sockaddr = (struct sockaddr *)talloc_memdup(addr, sockaddr, sockaddrlen);
|
||||
|
Loading…
Reference in New Issue
Block a user