-
Notifications
You must be signed in to change notification settings - Fork 320
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
iptables child process may not exit normally causing whole gateway to hang #269
Comments
Could you please try to reproduce described scenario with the following patch? |
I also find such bug, which caused by execute() function. In fact, not only fw_allow(), when u start up wifidog, u can also find some iptables rule not execute successly. |
I think in multi-thread process, using fork will cause some strange problem |
@liudf0716 |
In fact, apfree wifidog also use execute() heavily in fw operation, anyway I have do my best to avoid using execute(). In the future, I plan to replace execute() operation with iptables's api. |
This happens when a user authenticates and fw_allow() is called. On very rare occasions the iptables child process doesn't exit and waitpid() hangs waiting for it. Whats more the client list lock is also on resulting in the whole gateway being frozen. execute() needs changing and a timeout implementing, so if a child doesn't exit within x seconds, further action is taken, ie killing the child process, clearing using fw_deny() and then calling fw_allow() again.
The text was updated successfully, but these errors were encountered: