mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
More lenient IDNA processing in dig
If there are any problems with IDN processing, DiG will now quietly handle the name as if IDN were disabled. This means that international query names are rendered verbatim on the wire, and ACE names are printed raw without conversion to UTF8. If you want to check the syntax of international domain names, use the `idn2` utility.
This commit is contained in:
@@ -235,10 +235,8 @@ help(void) {
|
||||
" +[no]identify (ID responders in short "
|
||||
"answers)\n"
|
||||
#ifdef HAVE_LIBIDN2
|
||||
" +[no]idnin (Parse IDN names "
|
||||
"[default=on on tty])\n"
|
||||
" +[no]idnout (Convert IDN response "
|
||||
"[default=on on tty])\n"
|
||||
" +[no]idn (convert international "
|
||||
"domain names)\n"
|
||||
#endif /* ifdef HAVE_LIBIDN2 */
|
||||
" +[no]ignore (Don't revert to TCP for "
|
||||
"TC responses.)\n"
|
||||
@@ -1615,7 +1613,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
||||
break;
|
||||
case 'i':
|
||||
switch (cmd[1]) {
|
||||
case 'd': /* identify */
|
||||
case 'd':
|
||||
switch (cmd[2]) {
|
||||
case 'e':
|
||||
FULLCHECK("identify");
|
||||
@@ -1623,33 +1621,28 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
||||
break;
|
||||
case 'n':
|
||||
switch (cmd[3]) {
|
||||
case 'i':
|
||||
FULLCHECK("idnin");
|
||||
#ifndef HAVE_LIBIDN2
|
||||
if (state) {
|
||||
fprintf(stderr,
|
||||
";; IDN input support"
|
||||
" not enabled\n");
|
||||
}
|
||||
#else /* ifndef HAVE_LIBIDN2 */
|
||||
case '\0':
|
||||
FULLCHECK("idn");
|
||||
lookup->idnin = state;
|
||||
#endif /* ifndef HAVE_LIBIDN2 */
|
||||
break;
|
||||
case 'o':
|
||||
FULLCHECK("idnout");
|
||||
#ifndef HAVE_LIBIDN2
|
||||
if (state) {
|
||||
fprintf(stderr,
|
||||
";; IDN output support"
|
||||
" not enabled\n");
|
||||
}
|
||||
#else /* ifndef HAVE_LIBIDN2 */
|
||||
lookup->idnout = state;
|
||||
#endif /* ifndef HAVE_LIBIDN2 */
|
||||
break;
|
||||
case 'i': /* (compat) */
|
||||
FULLCHECK("idnin");
|
||||
lookup->idnin = state;
|
||||
break;
|
||||
case 'o': /* (compat) */
|
||||
FULLCHECK("idnout");
|
||||
lookup->idnout = state;
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
}
|
||||
#ifndef HAVE_LIBIDN2
|
||||
if (state) {
|
||||
printf(";; IDN support "
|
||||
"is not available\n");
|
||||
}
|
||||
#endif /* ifndef HAVE_LIBIDN2 */
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
|
Reference in New Issue
Block a user