From 1d1624d49fbf3327aa6086f3f3ef256ad796fa75 Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org" Date: Mon, 19 Dec 2005 20:46:36 +0000 Subject: Add support for per-family table flushing. ie. flush just AF_INET entries. Towards ipv6 support. --- src/libnetfilter_conntrack.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/libnetfilter_conntrack.c b/src/libnetfilter_conntrack.c index 0976143..3651fc7 100644 --- a/src/libnetfilter_conntrack.c +++ b/src/libnetfilter_conntrack.c @@ -1007,14 +1007,14 @@ int nfct_dump_expect_list(struct nfct_handle *cth, int family) return nfnl_listen(&cth->nfnlh, &callback_handler, cth); } -int nfct_flush_conntrack_table(struct nfct_handle *cth) +int nfct_flush_conntrack_table(struct nfct_handle *cth, int family) { struct nfnlhdr req; memset(&req, 0, sizeof(req)); nfnl_fill_hdr(&cth->nfnlh, (struct nlmsghdr *) &req, - 0, AF_INET, 0, IPCTNL_MSG_CT_DELETE, + 0, family, 0, IPCTNL_MSG_CT_DELETE, NLM_F_REQUEST|NLM_F_ACK); return nfnl_talk(&cth->nfnlh, &req.nlh, 0, 0, NULL, NULL, NULL); @@ -1139,14 +1139,14 @@ int nfct_event_expectation(struct nfct_handle *cth) return nfnl_listen(&cth->nfnlh, &callback_handler, cth); } -int nfct_flush_expectation_table(struct nfct_handle *cth) +int nfct_flush_expectation_table(struct nfct_handle *cth, int family) { struct nfnlhdr req; memset(&req, 0, sizeof(req)); nfnl_fill_hdr(&cth->nfnlh, (struct nlmsghdr *) &req, - 0, AF_INET, 0, IPCTNL_MSG_EXP_DELETE, + 0, family, 0, IPCTNL_MSG_EXP_DELETE, NLM_F_REQUEST|NLM_F_ACK); return nfnl_talk(&cth->nfnlh, &req.nlh, 0, 0, NULL, NULL, NULL); -- cgit v1.2.3