From: lvmengfan <[email protected]>

Before info.tc_modify_flow_deleted is assigned a value, error processing
of other statements goes to the out label. In the out label, the
uninitialized variant is used for condition determination, which may
cause uncertain behavior.

Fixes: 65b84d4a32bd ("dpif-netlink: avoid netlink modify flow put op failed 
after tc modify flow put op failed.")
Signed-off-by: lvmengfan <[email protected]>
---
 lib/dpif-netlink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
index ceb56c6..2b152fc 100644
--- a/lib/dpif-netlink.c
+++ b/lib/dpif-netlink.c
@@ -2077,6 +2077,8 @@ parse_flow_put(struct dpif_netlink *dpif, struct 
dpif_flow_put *put)
         return EOPNOTSUPP;
     }
 
+    info.tc_modify_flow_deleted = false;
+
     /* Get tunnel dst port */
     NL_ATTR_FOR_EACH(nla, left, put->actions, put->actions_len) {
         if (nl_attr_type(nla) == OVS_ACTION_ATTR_OUTPUT) {
@@ -2105,7 +2107,6 @@ parse_flow_put(struct dpif_netlink *dpif, struct 
dpif_flow_put *put)
     info.tunnel_csum_on = csum_on;
     info.recirc_id_shared_with_tc = (dpif->user_features
                                      & OVS_DP_F_TC_RECIRC_SHARING);
-    info.tc_modify_flow_deleted = false;
     err = netdev_flow_put(dev, &match,
                           CONST_CAST(struct nlattr *, put->actions),
                           put->actions_len,
-- 
1.8.3.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to