Commit 895fa596 authored by Li Qiong's avatar Li Qiong Committed by Pablo Neira Ayuso

netfilter: flowtable: add a 'default' case to flowtable datapath

Add a 'default' case in case return a uninitialized value of ret, this
should not ever happen since the follow transmit path types:

- FLOW_OFFLOAD_XMIT_UNSPEC
- FLOW_OFFLOAD_XMIT_TC

are never observed from this path. Add this check for safety reasons.
Signed-off-by: default avatarLi Qiong <liqiong@nfschina.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 7d7cfb48
...@@ -421,6 +421,10 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb, ...@@ -421,6 +421,10 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb,
if (ret == NF_DROP) if (ret == NF_DROP)
flow_offload_teardown(flow); flow_offload_teardown(flow);
break; break;
default:
WARN_ON_ONCE(1);
ret = NF_DROP;
break;
} }
return ret; return ret;
...@@ -682,6 +686,10 @@ nf_flow_offload_ipv6_hook(void *priv, struct sk_buff *skb, ...@@ -682,6 +686,10 @@ nf_flow_offload_ipv6_hook(void *priv, struct sk_buff *skb,
if (ret == NF_DROP) if (ret == NF_DROP)
flow_offload_teardown(flow); flow_offload_teardown(flow);
break; break;
default:
WARN_ON_ONCE(1);
ret = NF_DROP;
break;
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment