Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor behavior on kernel without IPv6 support when compiled with USE_IPV6 #393

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Compile mongoose with USE_IPV6
2. Compile linux kernel without IPv6 support
3. Run mongoose under this kernel

Right now, application fails to start with
'set_ports_option: cannot bind to <PORT>: Bad File Number.

'Bad file number' is due to closesocket(-1), which should be moved after cry(), 
since it modifies errno.

In this environment, mongoose should try to fall back to IPv4. 

For example, when 'sock = socket(so.lsa.sa.sa_family, SOCK_STREAM, 6)' fails, 
call should be retried with 
  so.lsa.sa.sa_family = AF_INET;
  so.lsa.sin.sin_port = so.lsa.sin6.sin6_port;

What version of the product are you using? On what operating system?
mongoose from git trunk, Linux kernel 2.6.29 without IPv6 support.

Impact: Android 2.x kernels are compiled without IPv6 support. Making universal 
binary which runs on every platform and optionally uses IPv6 is impossible 
right now.

Mentioned code is located near mongoose.c:4396.

Original issue reported on code.google.com by [email protected] on 23 Jan 2013 at 2:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant