[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:50:53 EST 2010


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

--- Comment #2 from jsburwell at gmail.com 2010-04-09 11:50:52 EST ---
(In reply to comment #1)
> 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?

Perhaps.  But it's a bit annoying to have to type the escaped square
brackets.  Maybe use something shells don't treat as special instead? 
But then doing something like that would be just as much effort as
fixing the bug.  :-)

-- 
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