From 720c2fad865d981b5fed2bad58ae97e6fcbe444e Mon Sep 17 00:00:00 2001 From: bol-van Date: Mon, 9 Dec 2024 14:34:49 +0300 Subject: [PATCH] nfqws: nfq_main error logic cleanup --- nfq/nfqws.c | 10 ++-------- nfq/params.h | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/nfq/nfqws.c b/nfq/nfqws.c index d22a318..86149fd 100644 --- a/nfq/nfqws.c +++ b/nfq/nfqws.c @@ -242,7 +242,7 @@ static int nfq_main(void) sec_harden(); if (params.droproot && !droproot(params.uid, params.gid)) - goto exiterr; + return 1; print_id(); #endif @@ -250,7 +250,7 @@ static int nfq_main(void) pre_desync(); if (!nfq_init(&h,&qh)) - goto exiterr; + return 1; fd = nfq_fd(h); do @@ -273,13 +273,7 @@ static int nfq_main(void) } while(e==ENOBUFS); nfq_deinit(&h,&qh); - return 0; - -exiterr: - if (qh) nfq_destroy_queue(qh); - if (h) nfq_close(h); - return 1; } #elif defined(BSD) diff --git a/nfq/params.h b/nfq/params.h index a7a24ff..d556913 100644 --- a/nfq/params.h +++ b/nfq/params.h @@ -20,8 +20,6 @@ #define TLS_PARTIALS_ENABLE true -#define Q_RCVBUF (128*1024) // in bytes -#define Q_SNDBUF (64*1024) // in bytes #define RAW_SNDBUF (64*1024) // in bytes #define Q_MAXLEN 1024 // in packets