From 8ec69bb7ecf3ca5edde5b7d9d7d5d3a5f8b6c405 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 11 May 2017 11:32:16 +0200 Subject: support_format_addrinfo: Fix flags and canonname formatting The address family splitting via format_ai_family made unpredictable the place where the canonname field was printed. This commit adjusts the implementation so that the ai_flags is checked for consistency across the list, and ai_canonname must only be present on the first list element. Tests for AI_CANONNAME are added to resolv/tst-resolv-basic. --- ChangeLog | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 4231a68860..d3137e73e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2017-05-11 Florian Weimer + + * support/support_format_addrinfo.c (format_ai_flags_1): Renamed + from format_ai_flags. + (format_ai_flags): New function. Incorporate flag formatting code + from format_ai_one. + (format_ai_canonname): New function. + (format_ai_one): Remove flags parameter. + (format_ai_family): Likewise. + (support_format_addrinfo): Call format_ai_flags, + format_ai_canonname. + * resolv/tst-resolv-basic.c (check_ai_hints): Extracted from + check_ai. + (check_ai): Call check_ai_hints. + (do_test): Add AI_CANONNAME tests. + 2017-05-11 Florian Weimer * sysdeps/posix/getaddrinfo.c (gethosts): Remove malloc_addrmem. -- cgit v1.2.3