nftnlrdr: list_redirect_rule() only in DEBUG
This commit is contained in:
parent
4e480a7c4e
commit
4f8a4abcd1
|
@ -241,7 +241,6 @@ delete_redirect_and_filter_rules(unsigned short eport, int proto)
|
||||||
struct nftnl_rule *r = NULL;
|
struct nftnl_rule *r = NULL;
|
||||||
in_addr_t iaddr = 0;
|
in_addr_t iaddr = 0;
|
||||||
uint16_t iport = 0;
|
uint16_t iport = 0;
|
||||||
extern void print_rule(rule_t *r);
|
|
||||||
|
|
||||||
d_printf(("delete_redirect_and_filter_rules(%d %d)\n", eport, proto));
|
d_printf(("delete_redirect_and_filter_rules(%d %d)\n", eport, proto));
|
||||||
reflesh_nft_cache_redirect();
|
reflesh_nft_cache_redirect();
|
||||||
|
@ -625,7 +624,11 @@ update_portmapping(const char * ifname, unsigned short eport, int proto,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
/* for debug */
|
/* for debug */
|
||||||
|
|
||||||
|
extern void print_rule(rule_t *r);
|
||||||
|
|
||||||
/* read the "filter" and "nat" tables */
|
/* read the "filter" and "nat" tables */
|
||||||
int
|
int
|
||||||
list_redirect_rule(const char * ifname)
|
list_redirect_rule(const char * ifname)
|
||||||
|
@ -650,6 +653,7 @@ list_redirect_rule(const char * ifname)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -60,6 +60,7 @@ static uint32_t rule_list_filter_validate = RULE_CACHE_INVALID;
|
||||||
static uint32_t rule_list_redirect_validate = RULE_CACHE_INVALID;
|
static uint32_t rule_list_redirect_validate = RULE_CACHE_INVALID;
|
||||||
static uint32_t rule_list_peer_validate = RULE_CACHE_INVALID;
|
static uint32_t rule_list_peer_validate = RULE_CACHE_INVALID;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
static const char *
|
static const char *
|
||||||
get_family_string(uint32_t family)
|
get_family_string(uint32_t family)
|
||||||
{
|
{
|
||||||
|
@ -207,6 +208,7 @@ print_rule(rule_t *r)
|
||||||
printf("nftables: unknown type: %d\n", r->type);
|
printf("nftables: unknown type: %d\n", r->type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static enum rule_reg_type *
|
static enum rule_reg_type *
|
||||||
get_reg_type_ptr(rule_t *r, uint32_t dreg)
|
get_reg_type_ptr(rule_t *r, uint32_t dreg)
|
||||||
|
|
Loading…
Reference in New Issue