summaryrefslogtreecommitdiff
path: root/librpc/ndr
diff options
context:
space:
mode:
Diffstat (limited to 'librpc/ndr')
-rw-r--r--librpc/ndr/libndr.h3
-rw-r--r--librpc/ndr/ndr.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index 39ae25f7e6..124c5f0d6e 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -124,6 +124,9 @@ struct ndr_print {
#define LIBNDR_FLAG_STR_UTF8 (1<<12)
#define LIBNDR_STRING_FLAGS (0x7FFC)
+/* set if relative pointers should *not* be marshalled in reverse order */
+#define LIBNDR_FLAG_NO_RELATIVE_REVERSE (1<<18)
+
/* set if relative pointers are marshalled in reverse order */
#define LIBNDR_FLAG_RELATIVE_REVERSE (1<<19)
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index 80025d71f0..4e584e102b 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -367,6 +367,9 @@ _PUBLIC_ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags)
if (new_flags & LIBNDR_ALIGN_FLAGS) {
(*pflags) &= ~LIBNDR_FLAG_REMAINING;
}
+ if (new_flags & LIBNDR_FLAG_NO_RELATIVE_REVERSE) {
+ (*pflags) &= ~LIBNDR_FLAG_RELATIVE_REVERSE;
+ }
(*pflags) |= new_flags;
}