summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-29 18:56:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:38 -0500
commitdf4d209b368e5e719f262c2bd80e381da5b0fff6 (patch)
tree4ab7a982c706d5a1e56ee97ed2a32dab28012afb /source4
parent4da57142b434de6dcd22538b8521421f02111eba (diff)
downloadsamba-df4d209b368e5e719f262c2bd80e381da5b0fff6.tar.gz
samba-df4d209b368e5e719f262c2bd80e381da5b0fff6.tar.bz2
samba-df4d209b368e5e719f262c2bd80e381da5b0fff6.zip
r16690: - fix bug 3896
- we didn't pushed the wins wack reply correctly to the wire, as NBT_QTYPE_NETBIOS is used and setting rdata.data.data was useless... metze (This used to be commit d3556e18892c0540e92f560f9d6b1b5587e41a62)
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/nbt.idl12
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl
index 65ae20111e..32f069c8de 100644
--- a/source4/librpc/idl/nbt.idl
+++ b/source4/librpc/idl/nbt.idl
@@ -165,12 +165,22 @@
[default] nbt_rdata_data data;
} nbt_rdata;
+/*
+ * this macro works arround the problem
+ * that we need to use nbt_rdata_data
+ * together with NBT_QTYPE_NETBIOS
+ * for WACK replies
+ */
+#define NBT_RES_REC_LEVEL(rr_type, rdata) (\
+ (((rr_type) == NBT_QTYPE_NETBIOS) && ((rdata).data.length == 2)) \
+ ? 0 : rr_type)
+
typedef [flag(LIBNDR_PRINT_ARRAY_HEX)] struct {
nbt_name name;
nbt_qtype rr_type;
nbt_qclass rr_class;
uint32 ttl;
- [switch_is(rr_type)] nbt_rdata rdata;
+ [switch_is(NBT_RES_REC_LEVEL(rr_type, rdata))] nbt_rdata rdata;
} nbt_res_rec;
typedef [flag(NDR_NOALIGN|NDR_BIG_ENDIAN|NDR_PAHEX),public] struct {