|
Lines 645-658
print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt,
Link Here
|
| 645 |
if (fputc('=', fp) == EOF) |
645 |
if (fputc('=', fp) == EOF) |
| 646 |
return -1; |
646 |
return -1; |
| 647 |
if (dl == 0) |
647 |
if (dl == 0) |
| 648 |
return 1; |
648 |
goto out; |
| 649 |
|
649 |
|
| 650 |
if (opt->type & OT_RFC1035) { |
650 |
if (opt->type & OT_RFC1035) { |
| 651 |
char domain[NS_MAXDNAME]; |
651 |
char domain[NS_MAXDNAME]; |
| 652 |
|
652 |
|
| 653 |
sl = decode_rfc1035(domain, sizeof(domain), data, dl); |
653 |
sl = decode_rfc1035(domain, sizeof(domain), data, dl); |
| 654 |
if (sl == 0 || sl == -1) |
654 |
if (sl == -1) |
| 655 |
return sl; |
655 |
return -1; |
|
|
656 |
if (sl == 0) |
| 657 |
goto out; |
| 656 |
if (valid_domainname(domain, opt->type) == -1) |
658 |
if (valid_domainname(domain, opt->type) == -1) |
| 657 |
return -1; |
659 |
return -1; |
| 658 |
return efprintf(fp, "%s", domain); |
660 |
return efprintf(fp, "%s", domain); |
|
Lines 693-701
print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt,
Link Here
|
| 693 |
return -1; |
695 |
return -1; |
| 694 |
} |
696 |
} |
| 695 |
} |
697 |
} |
| 696 |
if (fputc('\0', fp) == EOF) |
698 |
goto out; |
| 697 |
return -1; |
|
|
| 698 |
return 1; |
| 699 |
} |
699 |
} |
| 700 |
|
700 |
|
| 701 |
t = data; |
701 |
t = data; |
|
Lines 760-765
print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt,
Link Here
|
| 760 |
} |
760 |
} |
| 761 |
} |
761 |
} |
| 762 |
|
762 |
|
|
|
763 |
out: |
| 763 |
if (fputc('\0', fp) == EOF) |
764 |
if (fputc('\0', fp) == EOF) |
| 764 |
return -1; |
765 |
return -1; |
| 765 |
return 1; |
766 |
return 1; |