On Fri, Apr 24 2020, Jeremie Courreges-Anglas <j...@wxcvbn.org> wrote: > On Thu, Apr 23 2020, Eric Faurot <e...@openbsd.org> wrote: >> On Thu, Apr 23, 2020 at 10:34:39AM -0600, Theo de Raadt wrote: >>> It says the keyword gets parsed, but then does performs no action. >>> >>> But that is different from not parsing it. >>> >>> Additionally, this explains an option which other systems support, and >>> by explaining it this way, it is also explaining our behaviour in case >>> of inet6 vs inet4 conditions. >>> >>> So... I think it should stay. Eric, do you have an opinion? >> >> The doc lies because the inet6 option does not set the RES_USE_INET6 >> flag as stated. I think we should leave the entry in the doc but fix >> the wording to say it's there for historical reasons and does nothing. > > In the diff below I document the behavior on other operating systems > since this looks useful to Claudio. How does it read? > > (I really think this should go but if it doesn't I don't want it to stay > misleading as it is now.) > >> If we want to resurrect that option at some point, maybe we can >> consider making it set the RES_USE_INET6 flag but that feels like a >> bad idea right now, and this flag is apparently deprecated. > > I wholeheartedly with this, in my book RES_USE_INET6 and "options inet6" > are just early IPv6 experiments that went nowhere. > "options inet6" would break most programs that use gethostbyname(3). > >> But we should also fix the manpage for res_init(3) as the description >> of the flag is wrong too. > > Diff below. Thoughts, oks?
Committed, thanks. Eric suggested that we mark this option as deprecated. Proposal: Index: net/res_init.3 =================================================================== RCS file: /cvs/src/lib/libc/net/res_init.3,v retrieving revision 1.2 diff -u -p -r1.2 res_init.3 --- net/res_init.3 25 Apr 2020 14:30:05 -0000 1.2 +++ net/res_init.3 25 Apr 2020 14:38:39 -0000 @@ -183,6 +183,9 @@ feature. With this option .Xr gethostbyname 3 will return IPv6 addresses if available. +This option is deprecated in favor of the +.Xr getaddrinfo 3 +interface. On some operating systems this option also causes IPv4 addresses to be returned as IPv4-mapped IPv6 addresses. For example, 10.1.1.1 will be returned as ::ffff:10.1.1.1. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE