On Tue, Apr 13, 2021 at 11:06:05AM +0300, Roi Dayan wrote:
> It could be xmit type was not set and would default to FLOW_OFFLOAD_XMIT_NEIGH
> and in this type the gc expect to have a route info.
> Fix that by adding FLOW_OFFLOAD_XMIT_UNSPEC which defaults to 0.
Applied, thanks.
diff --git a/net/netfilter/nf_flow_table_core.c
b/net/netfilter/nf_flow_table_core.c
index 76573bae6664..39c02d1aeedf 100644
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
@@ -130,6 +130,9 @@ static int flow_offload_fill_route(struct flow_offload
*flow,
flow_tuple->dst_cache = dst;
flow_tuple->dst_cookie = flow_offload_dst_cookie(flow_tuple);
break;
+ default:
+ WARN_ON_ONCE(1);
+ break;
}
flow_tuple->xmit_type = route->tuple[dir].xmit_type;
I have included this chunk to make gcc happy.
net/netfilter/nf_flow_table_core.c: In function ‘flow_offload_fill_route’:
net/netfilter/nf_flow_table_core.c:116:2: warning: enumeration value
‘FLOW_OFFLOAD_XMIT_UNSPEC’ not handled in switch [-Wswitch]
116 | switch (route->tuple[dir].xmit_type) {
| ^~~~~~