summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/netlink.c4
-rw-r--r--src/run.c22
-rw-r--r--src/stats-mode.c12
-rw-r--r--src/sync-mode.c12
4 files changed, 25 insertions, 25 deletions
diff --git a/src/netlink.c b/src/netlink.c
index 2266201..15a30f6 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -90,7 +90,7 @@ struct nfct_handle *nl_init_dump_handler(void)
return h;
}
-struct nfct_handle *nl_init_overrun_handler(void)
+struct nfct_handle *nl_init_resync_handler(void)
{
struct nfct_handle *h;
@@ -172,7 +172,7 @@ int nl_flush_conntrack_table(struct nfct_handle *h)
return nfct_query(h, NFCT_Q_FLUSH, &CONFIG(family));
}
-int nl_overrun_request_resync(struct nfct_handle *h)
+int nl_send_resync(struct nfct_handle *h)
{
int family = CONFIG(family);
return nfct_send(h, NFCT_Q_DUMP, &family);
diff --git a/src/run.c b/src/run.c
index 2e373ce..b436113 100644
--- a/src/run.c
+++ b/src/run.c
@@ -204,9 +204,9 @@ void local_handler(int fd, void *data)
STATE(stats).local_unknown_request++;
}
-static void do_overrun_alarm(struct alarm_block *a, void *data)
+static void do_resync_alarm(struct alarm_block *a, void *data)
{
- nl_overrun_request_resync(STATE(overrun));
+ nl_send_resync(STATE(resync));
STATE(stats).nl_kernel_table_resync++;
}
@@ -313,16 +313,16 @@ init(void)
return -1;
}
- STATE(overrun) = nl_init_overrun_handler();
- if (STATE(overrun)== NULL) {
+ STATE(resync) = nl_init_resync_handler();
+ if (STATE(resync)== NULL) {
dlog(LOG_ERR, "can't open netlink handler: %s",
strerror(errno));
dlog(LOG_ERR, "no ctnetlink kernel support?");
return -1;
}
- nfct_callback_register(STATE(overrun),
+ nfct_callback_register(STATE(resync),
NFCT_T_ALL,
- STATE(mode)->overrun,
+ STATE(mode)->resync,
NULL);
/* no callback, it does not do anything with the output */
@@ -334,7 +334,7 @@ init(void)
return -1;
}
- init_alarm(&STATE(overrun_alarm), NULL, do_overrun_alarm);
+ init_alarm(&STATE(resync_alarm), NULL, do_resync_alarm);
STATE(fds) = create_fds();
if (STATE(fds) == NULL) {
@@ -344,7 +344,7 @@ init(void)
register_fd(STATE(local).fd, STATE(fds));
register_fd(nfct_fd(STATE(event)), STATE(fds));
- register_fd(nfct_fd(STATE(overrun)), STATE(fds));
+ register_fd(nfct_fd(STATE(resync)), STATE(fds));
if (STATE(mode)->register_fds &&
STATE(mode)->register_fds(STATE(fds)) == -1) {
@@ -435,7 +435,7 @@ static void __run(struct timeval *next_alarm)
* we resync ourselves.
*/
nl_resize_socket_buffer(STATE(event));
- add_alarm(&STATE(overrun_alarm), OVRUN_INT, 0);
+ add_alarm(&STATE(resync_alarm), OVRUN_INT, 0);
STATE(stats).nl_catch_event_failed++;
STATE(stats).nl_overrun++;
break;
@@ -455,8 +455,8 @@ static void __run(struct timeval *next_alarm)
}
}
- if (FD_ISSET(nfct_fd(STATE(overrun)), &readfds)) {
- nfct_catch(STATE(overrun));
+ if (FD_ISSET(nfct_fd(STATE(resync)), &readfds)) {
+ nfct_catch(STATE(resync));
if (STATE(mode)->purge)
STATE(mode)->purge();
}
diff --git a/src/stats-mode.c b/src/stats-mode.c
index 679a50c..159bbef 100644
--- a/src/stats-mode.c
+++ b/src/stats-mode.c
@@ -102,9 +102,9 @@ static void dump_stats(struct nf_conntrack *ct)
debug_ct(ct, "resync entry");
}
-static int overrun_stats(enum nf_conntrack_msg_type type,
- struct nf_conntrack *ct,
- void *data)
+static int resync_stats(enum nf_conntrack_msg_type type,
+ struct nf_conntrack *ct,
+ void *data)
{
if (ct_filter_conntrack(ct, 1))
return NFCT_CB_CONTINUE;
@@ -118,7 +118,7 @@ static int overrun_stats(enum nf_conntrack_msg_type type,
nfct_attr_unset(ct, ATTR_USE);
if (!cache_update_force(STATE_STATS(cache), ct))
- debug_ct(ct, "overrun stats resync");
+ debug_ct(ct, "stats resync");
return NFCT_CB_CONTINUE;
}
@@ -130,7 +130,7 @@ static int purge_step(void *data1, void *data2)
ret = nfct_query(STATE(dump), NFCT_Q_GET, obj->ct);
if (ret == -1 && errno == ENOENT) {
- debug_ct(obj->ct, "overrun purge stats");
+ debug_ct(obj->ct, "purge stats");
cache_del(STATE_STATS(cache), obj);
cache_object_free(obj);
}
@@ -196,7 +196,7 @@ struct ct_mode stats_mode = {
.local = local_handler_stats,
.kill = kill_stats,
.dump = dump_stats,
- .overrun = overrun_stats,
+ .resync = resync_stats,
.purge = purge_stats,
.event_new = event_new_stats,
.event_upd = event_update_stats,
diff --git a/src/sync-mode.c b/src/sync-mode.c
index 0dbd12d..2e189cb 100644
--- a/src/sync-mode.c
+++ b/src/sync-mode.c
@@ -518,7 +518,7 @@ static int purge_step(void *data1, void *data2)
ret = nfct_query(h, NFCT_Q_GET, obj->ct);
if (ret == -1 && errno == ENOENT) {
- debug_ct(obj->ct, "overrun purge resync");
+ debug_ct(obj->ct, "purge resync");
if (obj->status != C_OBJ_DEAD) {
cache_object_set_status(obj, C_OBJ_DEAD);
mcast_send_sync(obj, NET_T_STATE_DEL);
@@ -536,9 +536,9 @@ static int purge_sync(void)
return 0;
}
-static int overrun_sync(enum nf_conntrack_msg_type type,
- struct nf_conntrack *ct,
- void *data)
+static int resync_sync(enum nf_conntrack_msg_type type,
+ struct nf_conntrack *ct,
+ void *data)
{
struct cache_object *obj;
@@ -553,7 +553,7 @@ static int overrun_sync(enum nf_conntrack_msg_type type,
nfct_attr_unset(ct, ATTR_USE);
if ((obj = cache_update_force(STATE_SYNC(internal), ct))) {
- debug_ct(obj->ct, "overrun resync");
+ debug_ct(obj->ct, "resync");
mcast_send_sync(obj, NET_T_STATE_UPD);
}
@@ -629,7 +629,7 @@ struct ct_mode sync_mode = {
.local = local_handler_sync,
.kill = kill_sync,
.dump = dump_sync,
- .overrun = overrun_sync,
+ .resync = resync_sync,
.purge = purge_sync,
.event_new = event_new_sync,
.event_upd = event_update_sync,