summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@sernet.de>2008-01-16 13:43:07 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-19 07:05:26 +0100
commitc97df0d892d71462dfd631cf5e93f04641afaab3 (patch)
treee0ca9bc0a812bcf23b86880805d2d4fe2da8bc2f /source4
parent65f096c8cda9efd6cffb29b52cac610664bbfbc2 (diff)
downloadsamba-c97df0d892d71462dfd631cf5e93f04641afaab3.tar.gz
samba-c97df0d892d71462dfd631cf5e93f04641afaab3.tar.bz2
samba-c97df0d892d71462dfd631cf5e93f04641afaab3.zip
nbt_server: add some debug messages which show the used interfaces addresses
metze (from samba4wins tree 8eb30add7c95672a85b4084b4a3dbfa78db820c4)
Diffstat (limited to 'source4')
-rw-r--r--source4/nbt_server/interfaces.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/nbt_server/interfaces.c b/source4/nbt_server/interfaces.c
index d466db514d..f5ac49255a 100644
--- a/source4/nbt_server/interfaces.c
+++ b/source4/nbt_server/interfaces.c
@@ -109,6 +109,8 @@ static NTSTATUS nbtd_add_socket(struct nbtd_server *nbtsrv,
struct socket_address *bcast_address;
struct socket_address *unicast_address;
+ DEBUG(6,("nbtd_add_socket(%s, %s, %s, %s)\n", bind_address, address, bcast, netmask));
+
/*
we actually create two sockets. One listens on the broadcast address
for the interface, and the other listens on our specific address. This
@@ -326,17 +328,25 @@ struct nbtd_interface *nbtd_find_request_iface(struct nbtd_server *nbtd_server,
/* try to find a exact match */
for (cur=nbtd_server->interfaces;cur;cur=cur->next) {
if (iface_same_net(address, cur->ip_address, cur->netmask)) {
+ DEBUG(10,("find interface for dst[%s] ip: %s/%s (iface[%p])\n",
+ address, cur->ip_address, cur->netmask, cur));
return cur;
}
}
/* no exact match, if we have the broadcast interface, use that */
if (allow_bcast_iface && nbtd_server->bcast_interface) {
- return nbtd_server->bcast_interface;
+ cur = nbtd_server->bcast_interface;
+ DEBUG(10,("find interface for dst[%s] ip: %s/%s (bcast iface[%p])\n",
+ address, cur->ip_address, cur->netmask, cur));
+ return cur;
}
/* fallback to first interface */
- return nbtd_server->interfaces;
+ cur = nbtd_server->interfaces;
+ DEBUG(10,("find interface for dst[%s] ip: %s/%s (default iface[%p])\n",
+ address, cur->ip_address, cur->netmask, cur));
+ return cur;
}
/*