1922
/* Check to see if this is the CNAME form of the answer.
1922
1924
if(substring_issame_case(uindata,offset,len,query) != 1) {
1926
/* We look at the next answer given and discard this
1927
* one; we used to discard the entire DNS packet
1928
* at this point but that, alas, breaks microsoft.com */
1923
1929
if(rlog_level >= 4) {
1925
1931
show_timestamp();
1926
printf("substring_issame_case problem\n");
1932
printf("substring_issame_case is skipping answer\n");
1935
/* Jump past CLASS and TTL */
1937
/* Bounds checking, as always */
1938
if(offset + 2 > uindata->unit_count) {
1939
if(rlog_level >= 4) {
1942
printf("uindata string truncated\n");
1947
/* Find out how long this answer is */
1948
rdlength = ((*(uindata->string + offset ) & 0xff) << 8)
1949
+ *(uindata->string + offset + 1);
1950
/* And jump past this answer */
1951
offset += rdlength + 2;
1952
/* Again, bounds checking */
1953
if(offset >= uindata->unit_count) {
1954
if(rlog_level >= 4) {
1957
printf("uindata string ended\n");
1962
/* And now let's reset some stuff so we can inspect
1963
* the next answer the remote server gave us */
1965
is_arpa_address = 0;
1966
if(change_rtype(query,cname_original_record) == JS_ERROR) {
1967
if(rlog_level >= 4) {
1970
printf("change_rtype restore problem\n");
1975
/* And jump back to the beginning of this do { loop */
1931
1978
/* If it is a CNAME answer, DNS servers have this way
1932
1979
of politely also giving us the IP the CNAME points to