When vm of backend do not send reply packet, monitor state
should change state from waiting to  offline, but code of
current is to online, this is a bug, this patch is to fix
it!

Signed-off-by: wangchuanlei <[email protected]>
---
 controller/pinctrl.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index 38e8590af..1a21c7704 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -7526,13 +7526,9 @@ svc_monitors_run(struct rconn *swconn,
 
         case SVC_MON_S_WAITING:
             if (current_time > svc_mon->wait_time) {
-                if (svc_mon->protocol ==  SVC_MON_PROTO_TCP) {
-                    svc_mon->n_failures++;
-                    svc_mon->state = SVC_MON_S_OFFLINE;
-                } else {
-                    svc_mon->n_success++;
-                    svc_mon->state = SVC_MON_S_ONLINE;
-                }
+                svc_mon->n_failures++;
+                svc_mon->state = SVC_MON_S_OFFLINE;
+
                 svc_mon->next_send_time = current_time + svc_mon->interval;
                 next_run_time = svc_mon->next_send_time;
             } else {
-- 
2.27.0

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

Reply via email to