summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-12-10 21:24:28 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-12-20 02:12:18 +0100
commitc9b3b8207bc487de02cbca968927ba2c2cb46aaf (patch)
tree8d9da00ea367d2926c669c6b4886b8845f6d1370 /tools
parent0fd260056ef84ede8f444c66a3820811691fe884 (diff)
downloadlinux-c9b3b8207bc487de02cbca968927ba2c2cb46aaf.tar.gz
netfilter: nf_flow_table: fix big-endian integer overflow
In some configurations, gcc reports an integer overflow:

net/netfilter/nf_flow_table_offload.c: In function 'nf_flow_rule_match':
net/netfilter/nf_flow_table_offload.c:80:21: error: unsigned conversion from 'int' to '__be16' {aka 'short unsigned int'} changes value from '327680' to '0' [-Werror=overflow]
   mask->tcp.flags = TCP_FLAG_RST | TCP_FLAG_FIN;
                     ^~~~~~~~~~~~

From what I can tell, we want the upper 16 bits of these constants,
so they need to be shifted in cpu-endian mode.

Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions