Re: [PATCH] Reset resolver before looking up IP address.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> diff --git a/network.py b/network.py
> index 0d0e2b0..9661fda 100644
> --- a/network.py
> +++ b/network.py
> @@ -1,7 +1,7 @@
>  #
>  # network.py - network configuration install data
>  #
> -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008  Red Hat, Inc.
> +# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009  Red Hat, Inc.
>  #
>  # This program is free software; you can redistribute it and/or modify
>  # it under the terms of the GNU General Public License as published by
> @@ -440,6 +440,9 @@ class Network:
>              log.warning("no network devices were available to look up host name")
>              return None
>  
> +        # reset the resolver in case things have changed.
> +        isys.resetResolv()
> +
>          try:
>              (family, socktype, proto, canonname, sockaddr) = \
>                  socket.getaddrinfo(self.hostname, None, socket.AF_INET)[0]

As far as hacks go, this looks fine to me.  Oh if only we didn't have to
do this everywhere.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux