svn commit: samba r9704 - in branches/SAMBA_4_0: . source/lib/socket

Christopher R. Hertel crh at ubiqx.mn.org
Mon Aug 29 18:40:58 GMT 2005


On Mon, Aug 29, 2005 at 08:06:13AM +1000, tridge at samba.org wrote:
> Jelmer,
> 
>  > > Log: r9684 at blu: tridge | 2005-08-27 19:38:31 +1000 don't try to
>  > > call the name resolver on non-ipv4 names!
>  > >
>  > 
>  > Any specific reason for not including ipv6?
> 
> yep, our name resolver doesn't handle ipv6 yet. The libcli/resolve/
> code assumes ipv4 in two ways:
> 
>  - the 'host' resolver uses interpret_addr2(), which uses
>    interpret_addr(), which assumes a 4 byte address
> 
>  - the wins and bcast resolvers use NBT, which assumes IPv4 (in theory
>    NBT could do longer addresses I guess. I wonder if that works?)

In theory, yes, but in practice this may not work.  There's no problem in 
the Session or Datagram services, but the Name Service will likely have 
some issues.

For example, in RFC1002 the Name Registration Packet shows a hard-coded
RDLENGTH value of 6 bytes.  That includes the 2-byte NB_FLAGS field, so it
leaves only 4 bytes for the address.  Several related packets have the
same structure.

You could use a larger RDLENGTH value, of course, but my guess is that 
most implementations won't deal with this properly.  I'm not aware of any 
NBT implementations that support IPv6 addresses.

Of course, Samba4 could be written to handle IPv6 addresses.  Would be 
fun, I s'pose.

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org


More information about the samba-technical mailing list