]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: rpl: fix loop iteration
authorAlexander Aring <alex.aring@gmail.com>
Sat, 4 Apr 2020 15:22:57 +0000 (11:22 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Apr 2020 17:05:42 +0000 (10:05 -0700)
commit164eca0542f1e90f46f6b25a93a348a0ba274415
tree027c8c9a998c3a506d46f66ed5289d3448cad49a
parent795bc42d245bcfb6914f9273eda2eec57a593f15
ipv6: rpl: fix loop iteration

This patch fix the loop iteration by not walking over the last
iteration. The cmpri compressing value exempt the last segment. As the
code shows the last iteration will be overwritten by cmpre value
handling which is for the last segment.

I think this doesn't end in any bufferoverflows because we work on worst
case temporary buffer sizes but it ends in not best compression settings
in some cases.

Fixes: c3b5893eba1c ("net: ipv6: add support for rpl sr exthdr")
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/rpl.c