Closed RMerl closed 12 years ago
Crashes in web.c/do_upload_post(), on this code:
if (waitfor (fileno(stream), 10) <= 0) {
Apparently, stream is not a valid stream when using SSL, so fileno() returns -1. I hope it's not a bug in mssl, cause I know nothing about SSL programming...
I will need additional help to fix this one, as it deals with SSL and socket code, which I am unfamiliar with. For now I at least patched the code so httpd will no longer crash.
The root of the problem is that the file pointer lacks a valid file descriptor when created with ssl_server_fopen(). The whole POST handling code is quite complex when compared with Tomato's own code, which has no need for file descriptors.
Leaving this open for now until someone can give me a hand with this one, or I find some way to work around the issue.
The RT-N53 release based on Asuswrt 3.0.0.4.130 contains code in the httpd service that seems to address this issue. I need to either backport their fixes to my tree, or rebase my work on that build 130.
Confirmed fixed by Asus in build 130 (committed to the merlin-130 branch with baa7f3f805be1ef10c57c68ccfa9277bb8797282)
Bus error as soon you click on "Submit" when uploading a config file you want to restore, or a firmware you want to flash. Same operation works fine on non-SSL.