@@ -1073,27 +1073,29 @@ pinctrl_run(struct controller_ctx *ctx,
rconn_run(swconn);
- if (rconn_is_connected(swconn)) {
- if (conn_seq_no != rconn_get_connection_seqno(swconn)) {
- pinctrl_setup(swconn);
- conn_seq_no = rconn_get_connection_seqno(swconn);
- flush_put_mac_bindings();
- }
-
- /* Process a limited number of messages per call. */
- for (int i = 0; i < 50; i++) {
- struct ofpbuf *msg = rconn_recv(swconn);
- if (!msg) {
- break;
- }
+ if (!rconn_is_connected(swconn)) {
+ return;
+ }
- const struct ofp_header *oh = msg->data;
- enum ofptype type;
+ if (conn_seq_no != rconn_get_connection_seqno(swconn)) {
+ pinctrl_setup(swconn);
+ conn_seq_no = rconn_get_connection_seqno(swconn);
+ flush_put_mac_bindings();
+ }
- ofptype_decode(&type, oh);
- pinctrl_recv(oh, type, ctx);
- ofpbuf_delete(msg);
+ /* Process a limited number of messages per call. */
+ for (int i = 0; i < 50; i++) {
+ struct ofpbuf *msg = rconn_recv(swconn);
+ if (!msg) {
+ break;
}
+
+ const struct ofp_header *oh = msg->data;
+ enum ofptype type;
+
+ ofptype_decode(&type, oh);
+ pinctrl_recv(oh, type, ctx);
+ ofpbuf_delete(msg);
}
run_put_mac_bindings(ctx);
@@ -3566,6 +3566,19 @@ AT_CHECK([ovs-vsctl add-port br-int localvif1 -- set Interface localvif1 externa
echo "fffffffffffff0000000000108060001080006040001f00000000001c0a80102000000000000c0a80102" > expected
OVN_CHECK_PACKETS([hv/snoopvif-tx.pcap], [expected])
+# Check GARP packet when restart openflow connection.
+as hv
+OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
+
+OVS_WAIT_UNTIL([grep -c "waiting 4 seconds before reconnect" hv/ovn-controller.log])
+
+as hv
+start_daemon ovs-vswitchd --enable-dummy=system -vvconn -vofproto_dpif -vunixctl
+
+# Wait for packet to be received.
+echo "fffffffffffff0000000000108060001080006040001f00000000001c0a80102000000000000c0a80102" > expected
+OVN_CHECK_PACKETS([hv/snoopvif-tx.pcap], [expected])
+
# Delete the localnet ports.
AT_CHECK([ovs-vsctl del-port localvif1])
AT_CHECK([ovn-nbctl lsp-del ln_port])