net: pkt_filter: Avoid unused function warning
The get_ip_rules() function is only used if IPv4 or IPv6 filtering is enabled so add checks to avoid unused function warning. Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
parent
d29a2a599c
commit
c066deb5ef
1 changed files with 2 additions and 1 deletions
|
@ -49,6 +49,7 @@ struct npf_rule_list npf_ipv6_recv_rules = {
|
|||
/*
|
||||
* Helper function
|
||||
*/
|
||||
#if defined(CONFIG_NET_PKT_FILTER_IPV4_HOOK) || defined(CONFIG_NET_PKT_FILTER_IPV6_HOOK)
|
||||
static struct npf_rule_list *get_ip_rules(uint8_t pf)
|
||||
{
|
||||
switch (pf) {
|
||||
|
@ -68,7 +69,7 @@ static struct npf_rule_list *get_ip_rules(uint8_t pf)
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET_PKT_FILTER_IPV4_HOOK || CONFIG_NET_PKT_FILTER_IPV6_HOOK */
|
||||
/*
|
||||
* Rule application
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue