]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
ulogd: ulogd_inppkt_NFLOG: close nflog handle after unbinding
authorChris Boot <bootc@bootc.net>
Mon, 18 Nov 2013 11:09:14 +0000 (11:09 +0000)
committerEric Leblond <eric@regit.org>
Mon, 18 Nov 2013 22:34:03 +0000 (23:34 +0100)
The nflog handle is closed, and then nflog_unbind_pf() is called on it, which
triggers an assertion failure within libnfnetlink. This patch simply moves
the nflog_close() just after the nflog_unbind_pf() calls.

Signed-off-by: Chris Boot <bootc@bootc.net>
input/packet/ulogd_inppkt_NFLOG.c

index cc0c2d4cf84f0881cc2c4245b4becb7d0822a28d..61966267fbc34e7b00354de9d48fe1eeb07f2276 100644 (file)
@@ -618,12 +618,12 @@ static int start(struct ulogd_pluginstance *upi)
        return 0;
 
 out_bind:
-       nflog_close(ui->nful_h);
        if (group_ce(upi->config_kset).u.value == 0) {
                nflog_unbind_pf(ui->nful_h, AF_INET);
                nflog_unbind_pf(ui->nful_h, AF_INET6);
                nflog_unbind_pf(ui->nful_h, AF_BRIDGE);
        }
+       nflog_close(ui->nful_h);
 out_handle:
        free(ui->nfulog_buf);
 out_buf: