summaryrefslogtreecommitdiff
path: root/source4/nbt_server/interfaces.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-10 03:22:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:37 -0500
commitb9bb7f596de51496c18580863efbb8ac17c78970 (patch)
treee8ea83908a7a2e259e97b309595208481ef70b3d /source4/nbt_server/interfaces.c
parent57f69e6f37949636ae14c646517792fa40c9c75b (diff)
downloadsamba-b9bb7f596de51496c18580863efbb8ac17c78970.tar.gz
samba-b9bb7f596de51496c18580863efbb8ac17c78970.tar.bz2
samba-b9bb7f596de51496c18580863efbb8ac17c78970.zip
r5294: - added a separate NBT-WINS test for WINS operations (register, refresh, release and query)
- change the iface_n_*() functions to return a "const char *" instead of a "struct ipv4_addr" I think that in general we should move towards "const char *" for all IP addresses, as this makes IPv6 much easier, and is also easier to debug. Andrew, when you get a chance, could you fix some of the auth code to use strings for IPs ? - return a NTSTATUS error on bad name queries and node status instead of using rcode. This makes the calling code simpler. - added low level name release code in libcli/nbt/ - use a real IP in the register and wins nbt torture tests, as w2k3 WINS server silently rejects some operations that don't come from the IP being used (eg. it says "yes" to a release, but does not in fact release the name) (This used to be commit bb1ab11d8e0ea0bd9ae34aebeb565d36fe4b495f)
Diffstat (limited to 'source4/nbt_server/interfaces.c')
-rw-r--r--source4/nbt_server/interfaces.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/nbt_server/interfaces.c b/source4/nbt_server/interfaces.c
index 3cb690b85d..c84f630400 100644
--- a/source4/nbt_server/interfaces.c
+++ b/source4/nbt_server/interfaces.c
@@ -191,7 +191,7 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv)
for non-WINS queries not made on a specific
interface */
if (num_interfaces > 0) {
- primary_address = sys_inet_ntoa(*iface_n_ip(0));
+ primary_address = iface_n_ip(0);
} else {
primary_address = sys_inet_ntoa(interpret_addr2(
lp_netbios_name()));
@@ -208,9 +208,9 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv)
}
for (i=0; i<num_interfaces; i++) {
- const char *address = talloc_strdup(tmp_ctx, sys_inet_ntoa(*iface_n_ip(i)));
- const char *bcast = talloc_strdup(tmp_ctx, sys_inet_ntoa(*iface_n_bcast(i)));
- const char *netmask = talloc_strdup(tmp_ctx, sys_inet_ntoa(*iface_n_netmask(i)));
+ const char *address = talloc_strdup(tmp_ctx, iface_n_ip(i));
+ const char *bcast = talloc_strdup(tmp_ctx, iface_n_bcast(i));
+ const char *netmask = talloc_strdup(tmp_ctx, iface_n_netmask(i));
status = nbtd_add_socket(nbtsrv, address, address, bcast, netmask);
NT_STATUS_NOT_OK_RETURN(status);