[ovs-dev] [PATCH v4 19/28] datapath: backport: openvswitch: correct encoding of set tunnel action attributes
Pravin B Shelar
pshelar at ovn.org
Fri Jul 8 00:23:55 UTC 2016
upstream commit:
commit e905eabc90a5b787d8708df164543ee295bea5f2
Author: Simon Horman <simon.horman at netronome.com>
openvswitch: correct encoding of set tunnel action attributes
In a set action tunnel attributes should be encoded in a
nested action.
I noticed this because ovs-dpctl was reporting an error
when dumping flows due to the incorrect encoding of tunnel attributes
in a set action.
Fixes: fc4099f17240 ("openvswitch: Fix egress tunnel info.")
Signed-off-by: Simon Horman <simon.horman at netronome.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Pravin B Shelar <pshelar at ovn.org>
Acked-by: Jesse Gross <jesse at kernel.org>
---
datapath/flow_netlink.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
index b6020ab..0d9daa5 100644
--- a/datapath/flow_netlink.c
+++ b/datapath/flow_netlink.c
@@ -2453,7 +2453,10 @@ static int set_action_to_attr(const struct nlattr *a, struct sk_buff *skb)
if (!start)
return -EMSGSIZE;
- err = ovs_nla_put_tunnel_info(skb, tun_info);
+ err = ip_tun_to_nlattr(skb, &tun_info->key,
+ ip_tunnel_info_opts(tun_info),
+ tun_info->options_len,
+ ip_tunnel_info_af(tun_info));
if (err)
return err;
nla_nest_end(skb, start);
--
1.9.1
More information about the dev
mailing list