[PATCH][SAMBA4] IPv6 socket fixes

Andrew Bartlett abartlet at samba.org
Tue Jan 10 06:35:27 GMT 2006


On Tue, 2006-01-10 at 07:15 +0100, Stefan (metze) Metzmacher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Andrew Bartlett schrieb:
> > It always struck me that we should be returning an IP address, not a
> > reverse lookup name, when asking for the remote socket address.
> 
> yep, I also thought of this...
> 
> > Could one of the IPv6 gurus take a look at this (untested) patch?
> 
> jelmer, can you test this?
> 
> > ------------------------------------------------------------------------
> > 
> > Index: lib/socket/socket_ipv6.c
> > ===================================================================
> > --- lib/socket/socket_ipv6.c	(revision 12809)
> > +++ lib/socket/socket_ipv6.c	(working copy)
> > @@ -302,7 +302,8 @@
> >  	socklen_t len = sizeof(*peer_addr);
> >  	struct socket_address *peer;
> >  	int ret;
> > -	struct hostent *he;
> > +	char addr[128]
> why not char addr[INET6_ADDRSTRLEN]; ?

That's a useful #define.  I wish I could think of useful things like
that ;-)

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Student Network Administrator, Hawker College  http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20060110/5c5f952b/attachment.bin


More information about the samba-technical mailing list