]> git.baikalelectronics.ru Git - kernel.git/commit
sch_cake: Make sure we can write the IP header before changing DSCP bits
authorToke Høiland-Jørgensen <toke@redhat.com>
Thu, 4 Apr 2019 13:01:33 +0000 (15:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Apr 2019 17:55:59 +0000 (10:55 -0700)
commit8c36151c3966d07b23579053b274f2f5a6d90553
tree745972ccb1eada0d1672c97b65bbde019890316c
parenta4771a7ea8c641f044d3e7625ed532df4de68e9a
sch_cake: Make sure we can write the IP header before changing DSCP bits

There is not actually any guarantee that the IP headers are valid before we
access the DSCP bits of the packets. Fix this using the same approach taken
in sch_dsmark.

Reported-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_cake.c