mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
ipset-pf-support, fix compilation, close of pf socket.
This commit is contained in:
parent
3953f827fb
commit
fd11cd9182
4 changed files with 14 additions and 3 deletions
|
|
@ -270,6 +270,7 @@ ipset_check_zones_for_rrset(struct module_env *env, struct ipset_env *ie,
|
|||
|
||||
static int ipset_update(struct module_env *env, struct dns_msg *return_msg,
|
||||
struct query_info qinfo, struct ipset_env *ie)
|
||||
{
|
||||
size_t i;
|
||||
const char *setname;
|
||||
struct ub_packed_rrset_key *rrset;
|
||||
|
|
@ -344,7 +345,9 @@ int ipset_init(struct module_env* env, int id) {
|
|||
|
||||
int ipset_deinit(struct module_env* env, int id) {
|
||||
struct ipset_env *ipset_env = env->modinfo[id];
|
||||
#ifdef HAVE_NET_PFVAR_H
|
||||
close((filter_dev)ipset_env->dev);
|
||||
#endif
|
||||
free(ipset_env);
|
||||
env->modinfo[id] = NULL;
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -777,7 +777,7 @@ size_t pythonmod_get_mem(struct module_env* env, int id)
|
|||
*/
|
||||
static struct module_func_block pythonmod_block = {
|
||||
"python",
|
||||
&pythonmod_init, &pythonmod_deinit, &pythonmod_operate, &pythonmod_inform_super,
|
||||
&module_dummy_init, &module_dummy_init, &pythonmod_init, &pythonmod_deinit, &pythonmod_operate, &pythonmod_inform_super,
|
||||
&pythonmod_clear, &pythonmod_get_mem
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ fptr_whitelist_mod_setup(int (*fptr)(struct module_env* env, int id))
|
|||
else if(fptr == &dns64_setup) return 1;
|
||||
else if(fptr == &respip_setup) return 1;
|
||||
#ifdef WITH_PYTHONMODULE
|
||||
else if(fptr == &pythonmod_setup) return 1;
|
||||
else if(fptr == &pythonmod_init) return 1;
|
||||
#endif
|
||||
#ifdef WITH_DYNLIBMODULE
|
||||
else if(fptr == &dynlibmod_init) return 1;
|
||||
|
|
@ -448,7 +448,7 @@ fptr_whitelist_mod_desetup(void (*fptr)(struct module_env* env, int id))
|
|||
else if(fptr == &dns64_desetup) return 1;
|
||||
else if(fptr == &respip_desetup) return 1;
|
||||
#ifdef WITH_PYTHONMODULE
|
||||
else if(fptr == &pythonmod_desetup) return 1;
|
||||
else if(fptr == &pythonmod_deinit) return 1;
|
||||
#endif
|
||||
#ifdef WITH_DYNLIBMODULE
|
||||
else if(fptr == &dynlibmod_deinit) return 1;
|
||||
|
|
|
|||
|
|
@ -270,6 +270,14 @@ int fptr_whitelist_modenv_detect_cycle(int (*fptr)(
|
|||
*/
|
||||
int fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id));
|
||||
|
||||
/**
|
||||
* Check function pointer whitelist for module deinit call values.
|
||||
*
|
||||
* @param fptr: function pointer to check.
|
||||
* @return false if not in whitelist.
|
||||
*/
|
||||
int fptr_whitelist_mod_deinit(int (*fptr)(struct module_env* env, int id));
|
||||
|
||||
/**
|
||||
* Check function pointer whitelist for module setup call values.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue