#include "dnsmasq.h"
-/* isExtract == 2 -> DNSSEC mode, no bitstrings, no ascii checks. */
int extract_name(struct dns_header *header, size_t plen, unsigned char **pp,
char *name, int isExtract, int extrabytes)
{
if ((l & 0x3f) != 1)
return 0; /* we only understand bitstrings */
- if (isExtract != 1)
+ if (!isExtract)
return 0; /* Cannot compare bitsrings */
count = *p++;
if (isExtract)
{
unsigned char c = *p;
- if ((isExtract == 2 || (isascii(c) && !iscntrl(c))) && c != '.')
- *cp++ = *p;
+ if (c != 0 && c != '.')
+ *cp++ = c;
else
return 0;
}