[PATCH 02/13] resolv: Add tst-resolv-aliases

Florian Weimer fweimer@redhat.com
Fri Aug 19 14:20:42 GMT 2022


* Siddhesh Poyarekar:

>> +/* Set to true for an alternative pass that inserts (ignored) SIG
>> +   records.  This does not alter the response, so this property is not
>> +   encoded in the QNAME.  The variable needs to be volatile because
>> +   leaf attributes tell GCC that the response function is not
>> +   called.  */
>> +static volatile bool insert_sig;
>> +
>> +static void
>> +maybe_insert_sig (struct resolv_response_builder *b, const char *owner)
>> +{
>> +  resolv_response_open_record (b, owner, C_IN, T_SIG, 60);
>> +  resolv_response_add_data (b, "", 1);
>> +  resolv_response_close_record (b);
>> +}
>
> Why not consolidate this with the implementation in tst-resolv-byaddr?

The meat of the test is different, I think (gethostbyaddr vs
gethostbyname).  Only the scaffolding will overlap, and the response
function gets more complicated.

Or do you mean create a separate header file with just this static
variable and function?

Thanks,
Florian



More information about the Libc-alpha mailing list