mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-22 06:15:25 +00:00
nfqws: nfq_main error logic cleanup
This commit is contained in:
parent
7b057491af
commit
720c2fad86
10
nfq/nfqws.c
10
nfq/nfqws.c
@ -242,7 +242,7 @@ static int nfq_main(void)
|
|||||||
sec_harden();
|
sec_harden();
|
||||||
|
|
||||||
if (params.droproot && !droproot(params.uid, params.gid))
|
if (params.droproot && !droproot(params.uid, params.gid))
|
||||||
goto exiterr;
|
return 1;
|
||||||
|
|
||||||
print_id();
|
print_id();
|
||||||
#endif
|
#endif
|
||||||
@ -250,7 +250,7 @@ static int nfq_main(void)
|
|||||||
pre_desync();
|
pre_desync();
|
||||||
|
|
||||||
if (!nfq_init(&h,&qh))
|
if (!nfq_init(&h,&qh))
|
||||||
goto exiterr;
|
return 1;
|
||||||
|
|
||||||
fd = nfq_fd(h);
|
fd = nfq_fd(h);
|
||||||
do
|
do
|
||||||
@ -273,13 +273,7 @@ static int nfq_main(void)
|
|||||||
} while(e==ENOBUFS);
|
} while(e==ENOBUFS);
|
||||||
|
|
||||||
nfq_deinit(&h,&qh);
|
nfq_deinit(&h,&qh);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
exiterr:
|
|
||||||
if (qh) nfq_destroy_queue(qh);
|
|
||||||
if (h) nfq_close(h);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(BSD)
|
#elif defined(BSD)
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
|
|
||||||
#define TLS_PARTIALS_ENABLE true
|
#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 RAW_SNDBUF (64*1024) // in bytes
|
||||||
|
|
||||||
#define Q_MAXLEN 1024 // in packets
|
#define Q_MAXLEN 1024 // in packets
|
||||||
|
Loading…
Reference in New Issue
Block a user