summaryrefslogtreecommitdiffstats
path: root/examples/netfilter/nfct-daemon.c
diff options
context:
space:
mode:
authorKen-ichirou MATSUZAWA <chamaken@gmail.com>2013-12-07 20:32:29 +0900
committerFlorian Westphal <fw@strlen.de>2013-12-07 12:53:46 +0100
commit090a8427da036a2f64785682d4a40ec2d41a5de0 (patch)
treed5e558d92a8086096d2999083b830988a98eb0b0 /examples/netfilter/nfct-daemon.c
parent7d64d7299abd2f23faffec27829986020bceadbb (diff)
examples: use mnl_socket_setsockopt
instead of raw setsockopt() Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'examples/netfilter/nfct-daemon.c')
-rw-r--r--examples/netfilter/nfct-daemon.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/netfilter/nfct-daemon.c b/examples/netfilter/nfct-daemon.c
index a9b93db..a4ef0af 100644
--- a/examples/netfilter/nfct-daemon.c
+++ b/examples/netfilter/nfct-daemon.c
@@ -293,10 +293,8 @@ int main(int argc, char *argv[])
* b) if the user-space process does not pull messages from the
* receiver buffer so often.
*/
- setsockopt(mnl_socket_get_fd(nl), SOL_NETLINK,
- NETLINK_BROADCAST_ERROR, &on, sizeof(int));
- setsockopt(mnl_socket_get_fd(nl), SOL_NETLINK, NETLINK_NO_ENOBUFS,
- &on, sizeof(int));
+ mnl_socket_setsockopt(nl, NETLINK_BROADCAST_ERROR, &on, sizeof(int));
+ mnl_socket_setsockopt(nl, NETLINK_NO_ENOBUFS, &on, sizeof(int));
nlh = mnl_nlmsg_put_header(buf);
/* Counters are atomically zeroed in each dump */