openvswitch: Fix IPv6 exthdr handling with ct helpers.
authorJoe Stringer <joestringer@nicira.com>
Mon, 14 Sep 2015 18:14:50 +0000 (11:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Sep 2015 22:31:49 +0000 (15:31 -0700)
commitcc5706056baa3002b844ff240a1cc2199a978795
treee432102079b6cf36d60694424aeddfc5f6398df0
parent37a1d3611c126fd9782ce5235791f898f053e763
openvswitch: Fix IPv6 exthdr handling with ct helpers.

Static code analysis reveals the following bug:

        net/openvswitch/conntrack.c:281 ovs_ct_helper()
        warn: unsigned 'protoff' is never less than zero.

This signedness bug breaks error handling for IPv6 extension headers when
using conntrack helpers. Fix the error by using a local signed variable.

Fixes: cae3a2627520: "openvswitch: Allow attaching helpers to ct
action"
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/conntrack.c