SOLVED: re-reading /etc/gai.conf

Karl Auer kauer at biplane.com.au
Sun Jul 29 23:50:50 UTC 2012


On Fri, 2012-07-20 at 12:10 +1000, Karl Auer wrote:
> I have a question: When and how does /etc/gai.conf get read?

I am just following up on this in case anyone is interested in the
answer, which I worked out through much reading of source code and many
experiments.

For destination address selection, the file is read once per process. If
you change the file you need to restart the process before any changes
are picked up. You can put "reload yes" in the file, but that will stat
the file for every single DNS lookup, and (worst case) re-read the file
too. 

So for *destination* address selection, /etc/gai.conf works as described
in the file and in the man page.

For *source* address selection, /etc/gai.conf is ignored completely. If
you would like the file to be used as documented, you may find this blog
entry useful, especially the script in it:

   http://biplane.com.au/blog/?p=122

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://www.biplane.com.au/blog

GPG fingerprint: AE1D 4868 6420 AD9A A698 5251 1699 7B78 4EEE 6017
Old fingerprint: DA41 51B1 1481 16E1 F7E2 B2E9 3007 14ED 5736 F687





More information about the ubuntu-users mailing list