gthreadedresolver: Don’t warn on unrecognised record types

Otherwise the code isn’t forwards-compatible, and may be DOSed by
servers returning unknown records, if `G_DEBUG=fatal-warnings` is
enabled for some reason.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall
2022-03-18 15:52:18 +00:00
parent 51f70fe62e
commit 81193c5aac
2 changed files with 38 additions and 1 deletions

View File

@@ -780,7 +780,7 @@ g_resolver_records_from_res_query (const gchar *rrname,
record = parse_res_txt (answer, p + rdlength, &p);
break;
default:
g_warn_if_reached ();
g_debug ("Unrecognised DNS record type %u", rrtype);
record = NULL;
break;
}