ipv6: pointer math error in ip6_tnl_parse_tlv_enc_lim()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 1 Feb 2017 08:46:32 +0000 (11:46 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Feb 2017 15:39:26 +0000 (16:39 +0100)
commit3f5b5134ec7c9418415e4e660adebe6c6ec112fd
treece741b57465c8c5d8d67a12cc9add135418bfa5c
parent41e07a7e01d951cfd4c9a7dac90c921269d89513
ipv6: pointer math error in ip6_tnl_parse_tlv_enc_lim()

[ Upstream commit 63117f09c768be05a0bf465911297dc76394f686 ]

Casting is a high precedence operation but "off" and "i" are in terms of
bytes so we need to have some parenthesis here.

Fixes: fbfa743a9d2a ("ipv6: fix ip6_tnl_parse_tlv_enc_lim()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/ip6_tunnel.c