netfilter: convert the proto argument from u8 to u16
authorLi RongQing <lirongqing@baidu.com>
Fri, 22 Feb 2019 13:45:52 +0000 (21:45 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 1 Mar 2019 13:28:43 +0000 (14:28 +0100)
commit11d4dd0b20041289e60f0642d458b96389b3125d
treebf229db7341740b188f9023a777ae21c00ef0e6d
parent3e511d5652ce1c0cfb0092491e77a76ab80ed1f3
netfilter: convert the proto argument from u8 to u16

The proto in struct xt_match and struct xt_target is u16, when
calling xt_check_target/match, their proto argument is u8,
and will cause truncation, it is harmless to ip packet, since
ip proto is u8

if a etable's match/target has proto that is u16, will cause
the check failure.

and convert be16 to short in bridge/netfilter/ebtables.c

Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter/x_tables.h
net/bridge/netfilter/ebtables.c
net/netfilter/x_tables.c