diff options
| -rw-r--r-- | include/netlink.h | 1 | ||||
| -rw-r--r-- | src/cache_wt.c | 2 | ||||
| -rw-r--r-- | src/netlink.c | 15 | 
3 files changed, 3 insertions, 15 deletions
| diff --git a/include/netlink.h b/include/netlink.h index a8eb919..d8a4fef 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -16,7 +16,6 @@ int nl_send_resync(struct nfct_handle *h);  void nl_resize_socket_buffer(struct nfct_handle *h);  int nl_dump_conntrack_table(struct nfct_handle *h);  int nl_flush_conntrack_table(struct nfct_handle *h); -int nl_exist_conntrack(struct nfct_handle *h, const struct nf_conntrack *ct);  int nl_get_conntrack(struct nfct_handle *h, const struct nf_conntrack *ct);  int nl_create_conntrack(struct nfct_handle *h, const struct nf_conntrack *ct);  int nl_update_conntrack(struct nfct_handle *h, const struct nf_conntrack *ct); diff --git a/src/cache_wt.c b/src/cache_wt.c index 84a816f..4b67e8e 100644 --- a/src/cache_wt.c +++ b/src/cache_wt.c @@ -30,7 +30,7 @@ static void add_wt(struct cache_object *obj)  	char __ct[nfct_maxsize()];  	struct nf_conntrack *ct = (struct nf_conntrack *)(void*) __ct; -	ret = nl_exist_conntrack(STATE(request), obj->ct); +	ret = nl_get_conntrack(STATE(request), obj->ct);  	switch (ret) {  	case -1:  		dlog(LOG_ERR, "cache_wt problem: %s", strerror(errno)); diff --git a/src/netlink.c b/src/netlink.c index 15a30f6..e538aa0 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -178,8 +178,8 @@ int nl_send_resync(struct nfct_handle *h)  	return nfct_send(h, NFCT_Q_DUMP, &family);  } -static int -__nl_get_conntrack(struct nfct_handle *h, const struct nf_conntrack *ct) +/* if the handle has no callback, check for existence, otherwise, update */ +int nl_get_conntrack(struct nfct_handle *h, const struct nf_conntrack *ct)  {  	int ret;  	char __tmp[nfct_maxsize()]; @@ -197,17 +197,6 @@ __nl_get_conntrack(struct nfct_handle *h, const struct nf_conntrack *ct)  	return 1;  } -int nl_exist_conntrack(struct nfct_handle *h, const struct nf_conntrack *ct) -{ -	return __nl_get_conntrack(h, ct); -} - -/* get the conntrack and update the cache */ -int nl_get_conntrack(struct nfct_handle *h, const struct nf_conntrack *ct) -{ -	return __nl_get_conntrack(h, ct); -} -  int nl_create_conntrack(struct nfct_handle *h, const struct nf_conntrack *orig)  {  	int ret; | 
