diff options
author | Guenther Deschner <gd@samba.org> | 2007-10-11 15:18:50 +0200 |
---|---|---|
committer | Guenther Deschner <gd@samba.org> | 2007-10-11 15:18:50 +0200 |
commit | 89d33395e31a7ccb6b091e4a99a30d12e3367238 (patch) | |
tree | f2ec7c4ddbf9134ecae18e27bf792b90da372663 /source3/smbd/server.c | |
parent | 6b441e9e74b11bee4b661eaa17682d6351c264ff (diff) | |
parent | edfcfefa37bf948c990e7ad3a1aea1dd4c3cea09 (diff) | |
download | samba-89d33395e31a7ccb6b091e4a99a30d12e3367238.tar.gz samba-89d33395e31a7ccb6b091e4a99a30d12e3367238.tar.bz2 samba-89d33395e31a7ccb6b091e4a99a30d12e3367238.zip |
Merge commit 'origin/v3-2-test' into my_branch
(This used to be commit fbe5edec375c99421d19af086c4f597e70c963b8)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r-- | source3/smbd/server.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 0f47a550e9..8c92c91577 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -348,15 +348,24 @@ static BOOL open_sockets_smbd(BOOL is_daemon, BOOL interactive, const char *smb_ /* Now open a listen socket for each of the interfaces. */ for(i = 0; i < num_interfaces; i++) { - struct in_addr *ifip = iface_n_ip(i); + const struct sockaddr_storage *ifss = + iface_n_sockaddr_storage(i); + const struct in_addr *ifip; fstring tok; const char *ptr; - if(ifip == NULL) { + if (ifss == NULL) { DEBUG(0,("open_sockets_smbd: interface %d has NULL IP address !\n", i)); continue; } + /* For now only deal with IPv4. */ + if (ifss->ss_family != AF_INET) { + continue; + } + + ifip = &((const struct sockaddr_in *)ifss)->sin_addr; + for (ptr=ports; next_token(&ptr, tok, " \t,", sizeof(tok)); ) { unsigned port = atoi(tok); if (port == 0 || port > 0xffff) { |