openvswitch: use flow protocol when recalculating ipv6 checksums
authorSimon Horman <simon.horman@netronome.com>
Thu, 21 Apr 2016 01:49:15 +0000 (11:49 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 May 2016 00:06:36 +0000 (17:06 -0700)
commit2a33f756ae1986a67d145f050bf4350e5ee17746
tree136cdbb031ea0d059765ca9d46e37cb31eeb16ce
parentb5c9a73c501e8aed86dd578309813c7818ca248c
openvswitch: use flow protocol when recalculating ipv6 checksums

[ Upstream commit b4f70527f052b0c00be4d7cac562baa75b212df5 ]

When using masked actions the ipv6_proto field of an action
to set IPv6 fields may be zero rather than the prevailing protocol
which will result in skipping checksum recalculation.

This patch resolves the problem by relying on the protocol
in the flow key rather than that in the set field action.

Fixes: 83d2b9ba1abc ("net: openvswitch: Support masked set actions.")
Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/openvswitch/actions.c