[Bug 1734] IPv6 address in port forward options (-L) requires square brackets

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Fri Apr 9 11:42:12 EST 2010


https://bugzilla.mindrot.org/show_bug.cgi?id=1734

Damien Miller <djm at mindrot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |djm at mindrot.org
             Blocks|                            |1708

--- Comment #1 from Damien Miller <djm at mindrot.org> 2010-04-09 11:42:11 EST ---
The cause of this seems to be misc.c:hpdelim():

   373          if (*s == '[') {
   374                  if ((s = strchr(s, ']')) == NULL)
   375                          return NULL;
   376                  else
   377                          s++;
   378          } else if ((s = strpbrk(s, ":/")) == NULL)

Consider a forwarding string of 2222/::1/22. hpdelim() will correctly
extract the first argument, but when called again will break inside the
IPv6 address. This must have been broken for some time, since I don't
think this code has been touched in a while. 

Perhaps it would be better to just remove the promise of '/' separating
the strings and just require square brackets?

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list