GNOME Bugzilla – Bug 710173
Make Vinagre accept IPv6 addresses
Last modified: 2015-11-09 12:42:01 UTC
Created attachment 257333 [details] [review] vinagre_acceptipv6.patch Currently, Vinagre does not accept direct typing of IPv6 addresses in the "host" field. You have to use an hostname (which can then eventually be linked to an IPv6 address). A check seems to be wrong in the source code ; I added another check, too. Please consider the attached patch, which fixes this behavior.
Also affects latest master.
Review of attachment 257333 [details] [review]: Oops, sorry for missing this patch. One bug which needs fixing. ::: vinagre/vinagre-connection.c @@ +533,3 @@ + is_ipv6 = g_strstr_len (lhost, -1, ":"); + if (is_ipv6) + lhost = g_strconcat (g_strdup ("["), g_strdup (lhost), g_strdup ("]"), NULL); g_strconcat() duplicates the strings, so you don't need the g_strdup().
Created attachment 312086 [details] [review] Accept IPv6 addresses True. Please find attached a new version of the patch, which : - applies cleanly on latest master ; - does not leak memory with unneeded g_strdup()s ; - is shorter.
Review of attachment 312086 [details] [review]: Thanks for the updated patch. Pushed to master as commit 1b2df81a539dbdb629466cd1f670545d1b4768d6.
Please excuse my harshness and feel free to correct me if I'm mistaken, but this whole issue and the accepted patch seem to be horribly wrong. This bug should be marked as INVALID the moment it was reported because Vinagre has already supported the requested feature since 2009 - see 7c2e351780598a77552b23b0ac678461fcd87634. Anyway, the accepted patch makes it impossible to specify either a custom display number ("host:display") or a custom port number ("host::port") for the target - just look a dozen lines below the place that this patch inserts itself at. I believe a revert is in order.
(In reply to Michał Kępień from comment #5) > Please excuse my harshness and feel free to correct me if I'm mistaken, but > this whole issue and the accepted patch seem to be horribly wrong. > > This bug should be marked as INVALID the moment it was reported because > Vinagre has already supported the requested feature since 2009 - see > 7c2e351780598a77552b23b0ac678461fcd87634. > > Anyway, the accepted patch makes it impossible to specify either a custom > display number ("host:display") or a custom port number ("host::port") for > the target - just look a dozen lines below the place that this patch inserts > itself at. I believe a revert is in order. I concur that this change should be reverted. This broke specifying custom port numbers for me.
Reverted in master and gnome-3-18 branches.
*** Bug 757797 has been marked as a duplicate of this bug. ***