[v2] openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD

Message ID 1489679488-18874-1-git-send-email-kriskend@linux.vnet.ibm.com
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Kris Murphy March 16, 2017, 3:51 p.m.
Added a case for OVS_TUNNEL_KEY_ATTR_PAD to the switch statement
in ip_tun_from_nlattr in order to prevent the default case
returning an error.

Fixes: b46f6ded906e ("libnl: nla_put_be64(): align on a 64-bit area")
Signed-off-by: Kris Murphy <kriskend@linux.vnet.ibm.com>
---
 net/openvswitch/flow_netlink.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Joe Stringer March 16, 2017, 6:46 p.m. | #1
On 16 March 2017 at 08:51, Kris Murphy <kriskend@linux.vnet.ibm.com> wrote:
> Added a case for OVS_TUNNEL_KEY_ATTR_PAD to the switch statement
> in ip_tun_from_nlattr in order to prevent the default case
> returning an error.
>
> Fixes: b46f6ded906e ("libnl: nla_put_be64(): align on a 64-bit area")
> Signed-off-by: Kris Murphy <kriskend@linux.vnet.ibm.com>

Thanks for the fix. In future please also place the target tree (in
this case 'net') in the subject line.

Acked-by: Joe Stringer <joe@ovn.org>
David Miller March 16, 2017, 7 p.m. | #2
From: Kris Murphy <kriskend@linux.vnet.ibm.com>
Date: Thu, 16 Mar 2017 10:51:28 -0500

> Added a case for OVS_TUNNEL_KEY_ATTR_PAD to the switch statement
> in ip_tun_from_nlattr in order to prevent the default case
> returning an error.
> 
> Fixes: b46f6ded906e ("libnl: nla_put_be64(): align on a 64-bit area")
> Signed-off-by: Kris Murphy <kriskend@linux.vnet.ibm.com>

Applied and queued up for -stable, thanks.
Kris Murphy March 28, 2017, 3:22 p.m. | #3
The issue exists starting with 4.6 so can you add cc: 
Stable@vger.kernel.org #4.6+


On 3/16/2017 2:00 PM, David Miller wrote:
> From: Kris Murphy <kriskend@linux.vnet.ibm.com>
> Date: Thu, 16 Mar 2017 10:51:28 -0500
>
>> Added a case for OVS_TUNNEL_KEY_ATTR_PAD to the switch statement
>> in ip_tun_from_nlattr in order to prevent the default case
>> returning an error.
>>
>> Fixes: b46f6ded906e ("libnl: nla_put_be64(): align on a 64-bit area")
>> Signed-off-by: Kris Murphy <kriskend@linux.vnet.ibm.com>
> Applied and queued up for -stable, thanks.
>
Kris Murphy March 28, 2017, 3:32 p.m. | #4
Sorry that was incorrect, the commit that added the attribute was in 4.7 
so please add cc: Stable@vger.kernel.org #4.7+


On 3/28/2017 10:22 AM, Kris Murphy wrote:
> The issue exists starting with 4.6 so can you add cc: 
> Stable@vger.kernel.org #4.6+
>
>
> On 3/16/2017 2:00 PM, David Miller wrote:
>> From: Kris Murphy <kriskend@linux.vnet.ibm.com>
>> Date: Thu, 16 Mar 2017 10:51:28 -0500
>>
>>> Added a case for OVS_TUNNEL_KEY_ATTR_PAD to the switch statement
>>> in ip_tun_from_nlattr in order to prevent the default case
>>> returning an error.
>>>
>>> Fixes: b46f6ded906e ("libnl: nla_put_be64(): align on a 64-bit area")
>>> Signed-off-by: Kris Murphy <kriskend@linux.vnet.ibm.com>
>> Applied and queued up for -stable, thanks.
>>
>

Patch

diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index 6f5fa50..ceb3f3c 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -665,6 +665,8 @@  static int ip_tun_from_nlattr(const struct nlattr *attr,
 			tun_flags |= TUNNEL_VXLAN_OPT;
 			opts_type = type;
 			break;
+		case OVS_TUNNEL_KEY_ATTR_PAD:
+			break;
 		default:
 			OVS_NLERR(log, "Unknown IP tunnel attribute %d",
 				  type);