mirror of
https://github.com/bol-van/ipobfs.git
synced 2025-12-16 20:07:08 +03:00
fix bug
This commit is contained in:
@@ -583,17 +583,17 @@ int main(int argc, char **argv)
|
||||
goto exiterr;
|
||||
}
|
||||
|
||||
#if defined SOL_NETLINK && defined NETLINK_NO_ENOBUFS
|
||||
int yes=1;
|
||||
if (setsockopt(fd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &yes, sizeof(yes)) == -1)
|
||||
fprintf(stderr, "setsockopt(NETLINK_NO_ENOBUFS)");
|
||||
#endif
|
||||
|
||||
|
||||
if (!droproot(uid, gid)) goto exiterr;
|
||||
fprintf(stderr, "Running as UID=%u GID=%u\n", getuid(), getgid());
|
||||
|
||||
fd = nfq_fd(h);
|
||||
|
||||
#if defined SOL_NETLINK && defined NETLINK_NO_ENOBUFS
|
||||
int yes=1;
|
||||
if (setsockopt(fd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &yes, sizeof(yes)) == -1)
|
||||
fprintf(stderr, "setsockopt(NETLINK_NO_ENOBUFS)\n");
|
||||
#endif
|
||||
|
||||
while ((rv = recv(fd, buf, sizeof(buf), 0)) && rv >= 0)
|
||||
{
|
||||
int r = nfq_handle_packet(h, buf, rv);
|
||||
|
||||
Reference in New Issue
Block a user