keisisqrl / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

shellinaboxd should support IPv6 connections. #179

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run shellinaboxd
2. Attempt to connect to host on port 4200 via IPv6

What is the expected output? What do you see instead?
Connection to shellinaboxd, instead I see a connection refused error.
netstat shows nothing listening on ::4200

What version of the product are you using? On what operating system?
ShellInABox version 2.10 (revision 186)
Fedora 15

Please provide any additional information below.
Shell in a box is awesome! :-)

This might be helpful:
http://dev.bjtu.edu.cn/ideal/2011/03/26/a-patch-for-shellinabox-to-support-ipv6/

Thanks!

Original issue reported on code.google.com by naus...@google.com on 13 Apr 2012 at 7:37

GoogleCodeExporter commented 8 years ago
I applied the patch on version 2.14 and also modified the code at line 849 of 
file  libhttp/httpconnection.c :

#BEFORE:

      if (ch != '-' && ch != '.' &&
          (ch < '0' ||(ch > '9' && ch < 'A') ||
          (ch > 'Z' && ch < 'a')||(ch > 'z' && ch <= 0x7E))) {
        httpSendReply(http, 400, "Bad Request", NO_MSG);
        return HTTP_DONE;
      }

#AFTER:

      if (ch != '[' && ch != ']' && ch != '-' && ch != '.' &&
         (ch < '0' || (ch > '9' && ch < 'A') ||
         (ch > 'Z' && ch < 'a') || (ch > 'z' && ch <= 0x7E)))
      {
        //debug("Error, Host [%s]\n", host);
        httpSendReply(http, 400, "Bad Request", NO_MSG);
        return HTTP_DONE;
      }

Greetings.

Original comment by molinari...@gmail.com on 1 Oct 2012 at 8:10

GoogleCodeExporter commented 8 years ago
pleas provide patch for Ipv6 issue the provided link is not working.

Original comment by ssksuman...@gmail.com on 2 Sep 2014 at 7:31