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

Issue with INADDR_TO_IFP on linux #10

Open
mretallack opened this issue Mar 16, 2016 · 0 comments
Open

Issue with INADDR_TO_IFP on linux #10

mretallack opened this issue Mar 16, 2016 · 0 comments

Comments

@mretallack
Copy link

When the "me" rule is used in ipfw, the ipfw kernel module calls INADDR_TO_IFP which is a macro for ip_dev_find which wraps __ip_dev_find with the "devref" argument set to active. This means that the __ip_dev_find call increments the device reference for the provided net device.

The caller of INADDR_TO_IFP does not call dev_put to release the reference. This means that the net device cannot be released and generates a "waiting for tun0 to become free. Usage count = 3" error.

For kernels greater then 2.6.39, the __ip_dev_find call was added, the attached patch uses this call instead with the "devref" set to false, all the calls for INADDR_TO_IFP just check for non-null return so don't need a device reference.

fix-dev_hold-leak.txt

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

1 participant