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

iptables child process may not exit normally causing whole gateway to hang #269

Open
gareth41 opened this issue Nov 7, 2016 · 5 comments

Comments

@gareth41
Copy link

gareth41 commented Nov 7, 2016

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.

@sysoleg
Copy link
Contributor

sysoleg commented Jan 22, 2017

Could you please try to reproduce described scenario with the following patch?

#248

@liudf0716
Copy link

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.

@liudf0716
Copy link

I think in multi-thread process, using fork will cause some strange problem

@KazukiShimada
Copy link

@liudf0716
Do you mean your apfree_wifidog has been fixed it yet?
https://github.com/liudf0716/apfree_wifidog

@liudf0716
Copy link

liudf0716 commented Feb 7, 2017

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.

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

No branches or pull requests

4 participants