[PATCH rhel7-branch] Fix IP / hostname mismatches when showing VNC server address (#1186726)

Brian C. Lane bcl at redhat.com
Mon Jun 15 16:18:50 UTC 2015


On Mon, Jun 15, 2015 at 02:58:34PM +0200, Radek Vykydal wrote:
> Resolves: rhbz#1186726
> This should fix also #1172858
> 
> Fix various cases when two NICs with DNS configured or not come into play.
> 
> Using current hostname and trying to check if IP offered for VNC (default route
> device) matches it with reverse lookup was an unnecessarily complicated way,
> instead just try to resolve the IP.  Also fix host reported in VNC client.
> ---
>  pyanaconda/vnc.py | 27 +++++++++++++++------------
>  1 file changed, 15 insertions(+), 12 deletions(-)
> 
> diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py
> index 2626786..054e25b 100644
> --- a/pyanaconda/vnc.py
> +++ b/pyanaconda/vnc.py
> @@ -107,36 +107,39 @@ class VncServer:
>              return
>  
>          ipstr = self.ip

May as well drop this ^^ line

> +        if self.ip.find(':') != -1:
> +            ipstr = "[%s]" % (self.ip,)
> +        else:
> +            ipstr = self.ip
> +

Ack

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list