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

nflog.c: nflog_unbind_pf called instead of nflog_bind_pf #1

Closed
mpuzio opened this issue Jan 7, 2016 · 1 comment
Closed

nflog.c: nflog_unbind_pf called instead of nflog_bind_pf #1

mpuzio opened this issue Jan 7, 2016 · 1 comment

Comments

@mpuzio
Copy link

mpuzio commented Jan 7, 2016

Just a quick issue I noticed while browsing the code. This would easily go undetected, because it appears that nflog_bind_pf() ignores second parameter and always binds for both AF_INET and AF_INET6. Thus "nflog_bind_pf(n->h, AF_INET6)" a few lines further hides the bug.

--- src/nflog.c.orig    2016-01-07 12:53:09.000000000 -0600
+++ src/nflog.c 2016-01-07 12:53:39.933119500 -0600
@@ -81,7 +81,7 @@
         PFATAL("nflog_unbind_pf(AF_INET6)");
     }

-    r = nflog_unbind_pf(n->h, AF_INET);
+    r = nflog_bind_pf(n->h, AF_INET);
     if (r < 0) {
         PFATAL("nflog_bind_pf(AF_INET)");
     }
@majek majek closed this as completed in becde0d Jan 8, 2016
@majek
Copy link
Contributor

majek commented Jan 8, 2016

Awesome report. Thanks!

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

2 participants