#define LIBNDR_FLAG_STR_RAW8 (1<<13)
#define LIBNDR_STRING_FLAGS (0x7FFC)
+#define LIBNDR_FLAG_STR_NO_COMPRESSION (1<<14)
+
/*
* don't debug NDR_ERR_BUFSIZE failures,
* as the available buffer might be incomplete.
}
while (s && *s) {
- enum ndr_err_code ndr_err;
char *compname;
size_t complen;
- uint32_t offset;
/* see if we have pushed the remaining string already,
* if so we use a label pointer to this string
*/
- ndr_err = ndr_token_retrieve_cmp_fn(&ndr->dns_string_list, s,
- &offset,
- (comparison_fn_t)strcmp,
- false);
- if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- uint8_t b[2];
-
- if (offset > 0x3FFF) {
- return ndr_push_error(ndr, NDR_ERR_STRING,
- "offset for dns string " \
- "label pointer " \
- "%u[%08X] > 0x00003FFF",
- offset, offset);
+ if (!(ndr->flags & LIBNDR_FLAG_STR_NO_COMPRESSION)) {
+ enum ndr_err_code ndr_err;
+ uint32_t offset;
+
+ ndr_err = ndr_token_retrieve_cmp_fn(&ndr->dns_string_list, s,
+ &offset,
+ (comparison_fn_t)strcmp,
+ false);
+ if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ uint8_t b[2];
+
+ if (offset > 0x3FFF) {
+ return ndr_push_error(ndr, NDR_ERR_STRING,
+ "offset for dns string " \
+ "label pointer " \
+ "%u[%08X] > 0x00003FFF",
+ offset, offset);
+ }
+
+ b[0] = 0xC0 | (offset>>8);
+ b[1] = (offset & 0xFF);
+
+ return ndr_push_bytes(ndr, b, 2);
}
-
- b[0] = 0xC0 | (offset>>8);
- b[1] = (offset & 0xFF);
-
- return ndr_push_bytes(ndr, b, 2);
}
complen = strcspn(s, ".");