to be a static string, for TLS-on-connect cases; meaning that resumption
will always be attempted (unless deliberately overriden).
-JH/06 Bug 3054: Fix dnsdb lookup for a TXT record with multiple chunks. This
- was broken by hardening introduced for Bug 3033.
+JH/06 Bug 3054: Fix dnsdb lookup for a TXT record with multiple chunks, with a
+ chunk-separator specification. This was broken by hardening introduced
+ for Bug 3031.
test.ex. TXT "A TXT record for test.ex."
s/lash TXT "A TXT record for s/lash.test.ex."
long TXT "This is a max-length chunk 789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234" "A short chunk" "A final chunk"
+long TXT "Second RR"
cname CNAME test.ex.
test.ex ${lookup dnsdb{test.ex}{$value}fail}
s/lash.test.ex ${lookup dnsdb{s/lash.test.ex}{$value}fail}
txt=test.ex ${lookup dnsdb{txt=test.ex}{$value}fail}
-txt=long.test.ex ${lookup dnsdb{>\n; txt=long.test.ex}{$value}fail}
+>X txt=test.ex ${lookup dnsdb{txt=test.ex}{$value}fail}
+>X; txt=test.ex ${lookup dnsdb{txt=test.ex}{$value}fail}
+>X, txt=test.ex ${lookup dnsdb{txt=test.ex}{$value}fail}
+>X, txt=test.ex ${lookup dnsdb{txt=test.ex}{$value}fail}
+txt=long.test.ex ${lookup dnsdb{ txt=long.test.ex}{$value}fail}
+>X txt=long.test.ex ${lookup dnsdb{>X txt=long.test.ex}{$value}fail}
+>X; txt=long.test.ex ${lookup dnsdb{>X; txt=long.test.ex}{$value}fail}
+>X, txt=long.test.ex ${lookup dnsdb{>X, txt=long.test.ex}{$value}fail}
+>X,Z txt=long.test.ex ${lookup dnsdb{>X,Z txt=long.test.ex}{$value}fail}
a=black-1.test.ex ${lookup dnsdb{a=black-1.test.ex}{$value}fail}
xxx=test.ex ${lookup dnsdb{xxx=test.ex}{$value}fail}
a=localhost.test.ex ${lookup dnsdb{a=localhost.test.ex}{$value}fail}
BOOL pass_on_not_found = FALSE;
tlist *typeptr;
uschar *pk = *pkptr;
-uschar buffer[256];
+uschar buffer[512];
uschar rrdomain[256];
uschar RRdomain[256];
break;
case ns_t_txt:
- pp = pk++;
- if (*p == '"') p++; /* Should always be the case */
- while (*p != 0 && *p != '"') *pk++ = *p++;
- *pp = pk - pp - 1;
+ while (*p)
+ {
+ pp = pk++; /* Skip the size byte in output */
+ if (*p == '"') p++; /* Should always be the case */
+ while (*p && *p != '"') *pk++ = *p++;
+ *pp = pk - pp - 1; /* fill in the size */
+ p++; /* skip the closing doublequote */
+ while (isspace(*p)) p++; /* next chunk start */
+ }
break;
- /*XXX need a way of doing multi-chunk TXT RRs */
case ns_t_tlsa:
pk = bytefield(&p, pk); /* usage */
> test.ex A TXT record for test.ex.
> s/lash.test.ex A TXT record for s/lash.test.ex.
> txt=test.ex A TXT record for test.ex.
-> txt=long.test.ex This is a max-length chunk 789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234A short chunkA final chunk
+> >X txt=test.ex A TXT record for test.ex.
+> >X; txt=test.ex A TXT record for test.ex.
+> >X, txt=test.ex A TXT record for test.ex.
+> >X, txt=test.ex A TXT record for test.ex.
+> txt=long.test.ex This is a max-length chunk 789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
+Second RR
+> >X txt=long.test.ex This is a max-length chunk 789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234XSecond RR
+> >X; txt=long.test.ex This is a max-length chunk 789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234A short chunkA final chunkXSecond RR
+> >X, txt=long.test.ex This is a max-length chunk 789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 A short chunk A final chunkXSecond RR
+> >X,Z txt=long.test.ex This is a max-length chunk 789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234ZA short chunkZA final chunkXSecond RR
> a=black-1.test.ex V4NET.11.12.13
> Failed: lookup of "xxx=test.ex" gave DEFER: unsupported DNS record type
> a=localhost.test.ex 127.0.0.1