Adding IPv6 support to Samba

Jason Coene jason at
Mon Apr 15 11:34:13 GMT 2002

I've also thought of this, assuming it can be cleanly done it may be something to accomplish for 3.0 -- it would certainly be a nice feature to have. I and a lot of people i know prefer to access remote smb servers across the internet using \\ipaddress, where no nmbd is necessary, and with the supposed forthcoming adoption of IPv6, it may need to be done sooner than later. Immediately off the top of my head, the changes that would need to be made would be to move away from older, incompatible networking oriented data types (as Nathan noted), as well as modify any string or logic comparison functions (such as hosts deny directive would use). Do the key developers see any stumbling blocks?



> -----Original Message-----
> From: Nathan Lutchansky <lutchann-sambatech at>
> Sent: April 15, 2002, 1:35 PM
> Subject: Adding IPv6 support to Samba
>Has anybody thought about or attempted to do this?  Although IPv4
>addressing is deeply embedded in NBT, SMB has no IPv4 dependencies at all,
>so it is straightforward to run direct-hosted SMB (port 445) over IPv6.
>Taking a brief look at the Samba source, I see there are in_addr structs 
>scattered all over the place, so adding IPv6 would involve changing the 
>API a bit.  Example:
>cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
>would change to:
>cli_connect(struct cli_state *cli, const char *host, struct sockaddr *sa)
>Other modifications would be similar.
>I'd really like to have IPv6 support, since a lot of the machines I use
>SMB with are behind NATs.  Although Win32 doesn't yet support SMB over
>IPv6, using a trivial redirector program on such machines to accept
>connections on 445 on the IPv6 side and connect them to
>works just fine in the few experiments I've done.
>Is this a feature anybody else would like to have?  Do the core developers 
>have any feelings on this?  -Nathan
>| Nathan Lutchansky | lutchann at |  Lithium Technologies  |
>|  I dread success.  To have succeeded is to have finished one's   |
>|  business on earth...  I like a state of continual becoming,     |
>|  with a goal in front and not behind. - George Bernard Shaw      |

More information about the samba-technical mailing list