diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-11-25 22:14:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-17 17:07:58 +0300 |
commit | 87ff3fb30de11a64d25a4a22f23def1ce77cf840 (patch) | |
tree | 9790b370e348ffb2eef8d5ea977006b6261cf718 /net/sched/cls_bpf.c | |
parent | 60335608e2f1ad6e55acaa4f13bd0f3bcd156dbd (diff) | |
download | linux-87ff3fb30de11a64d25a4a22f23def1ce77cf840.tar.xz |
net: openvswitch: datapath: fix data type in queue_gso_packets
[ Upstream commit 2734166e89639c973c6e125ac8bcfc2d9db72b70 ]
gso_type is being used in binary AND operations together with SKB_GSO_UDP.
The issue is that variable gso_type is of type unsigned short and
SKB_GSO_UDP expands to more than 16 bits:
SKB_GSO_UDP = 1 << 16
this makes any binary AND operation between gso_type and SKB_GSO_UDP to
be always zero, hence making some code unreachable and likely causing
undesired behavior.
Fix this by changing the data type of variable gso_type to unsigned int.
Addresses-Coverity-ID: 1462223
Fixes: 0c19f846d582 ("net: accept UFO datagrams from tuntap and packet")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sched/cls_bpf.c')
0 files changed, 0 insertions, 0 deletions