diff mbox series

[ovs-dev,ovn] ovn-controller: Fix unixctl reply error when injecting packets

Message ID 1564665042-22458-1-git-send-email-dceara@redhat.com
State Rejected
Headers show
Series [ovs-dev,ovn] ovn-controller: Fix unixctl reply error when injecting packets | expand

Commit Message

Dumitru Ceara Aug. 1, 2019, 1:10 p.m. UTC
If ofctrl_inject_pkt returns NULL (operation successful) reply with NULL
(no error) to the unixctl connection that requested the inject.

CC: Han Zhou <hzhou8@ebay.com>
Fixes: 80904ebcfce4 ("ovn-controller: Split addr_sets from runtime_data.")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
 controller/ovn-controller.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index ad33d17..9e8e507 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -2079,12 +2079,14 @@  main(int argc, char *argv[])
                         unixctl_command_reply_error(pending_pkt.conn, error);
                         free(error);
                     } else {
-                        VLOG_DBG("Pending_pkt conn but br_int %p or chassis "
-                                 "%p not ready. run-id: %"PRIu64, br_int,
-                                 chassis, engine_run_id);
-                        unixctl_command_reply_error(pending_pkt.conn,
-                            "ovn-controller not ready.");
+                        unixctl_command_reply(pending_pkt.conn, NULL);
                     }
+                } else {
+                    VLOG_DBG("Pending_pkt conn but br_int %p or chassis "
+                             "%p not ready. run-id: %"PRIu64, br_int,
+                             chassis, engine_run_id);
+                    unixctl_command_reply_error(pending_pkt.conn,
+                                                "ovn-controller not ready.");
                 }
                 pending_pkt.conn = NULL;
                 free(pending_pkt.flow_s);