path: root/src/conntrack/callback.c
diff options
authorPablo Neira Ayuso <>2009-05-23 11:52:20 +0200
committerPablo Neira Ayuso <>2009-05-23 11:52:20 +0200
commit20ed81b10714dfe78e31e9721e2d4f42b4beabb2 (patch)
treecc2482605cfff21244cb090f9d2e76bfb95514aa /src/conntrack/callback.c
parent975ae9979ec73e8acb2c215ee9a84fded2f4357a (diff)
api: add new callback interface while keeping backward compatibility
This patch adds nfct_callback_register2() and nfct_callback_unregister2() that allows to register a callback function with a new callback interface that includes the Netlink message. This fixes an early design error. This is not nice but it is the only way to resolve this problem without breaking backward (I don't like function versioning, it is messy). Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/conntrack/callback.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/conntrack/callback.c b/src/conntrack/callback.c
index 7faf13a..c83a564 100644
--- a/src/conntrack/callback.c
+++ b/src/conntrack/callback.c
@@ -31,6 +31,8 @@ int __callback(struct nlmsghdr *nlh, struct nfattr *nfa[], void *data)
if (container->h->cb)
ret = container->h->cb(type, ct, container->data);
+ else if (container->h->cb2)
+ ret = container->h->cb2(nlh, type, ct, container->data);
switch(ret) {