[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210413104527.GA23193@salvia>
Date: Tue, 13 Apr 2021 12:45:27 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Roi Dayan <roid@...dia.com>
Cc: netdev@...r.kernel.org, Oz Shlomo <ozsh@...dia.com>,
Paul Blakey <paulb@...dia.com>,
Saeed Mahameed <saeedm@...dia.com>
Subject: Re: [PATCH net-next v2 1/1] netfilter: flowtable: Add
FLOW_OFFLOAD_XMIT_UNSPEC xmit type
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) {
| ^~~~~~
Powered by blists - more mailing lists