@@ -1535,6 +1535,29 @@ execute_nd_ns(const struct ovnact_nest *on, const struct ovntrace_datapath *dp,
}
static void
+execute_icmp(const struct ovnact_nest *on, const struct ovntrace_datapath *dp,
+ const struct flow *uflow, uint8_t table_id,
+ enum ovnact_pipeline pipeline, struct ovs_list *super)
+{
+ struct flow icmp_flow = *uflow;
+
+ /* Update fields for ICMP. */
+ icmp_flow.dl_dst = uflow->dl_dst;
+ icmp_flow.dl_src = uflow->dl_src;
+ icmp_flow.nw_dst = uflow->nw_dst;
+ icmp_flow.nw_src = uflow->nw_src;
+ icmp_flow.nw_proto = 1;
+ icmp_flow.tp_src = htons(3); /* icmp type */
+ icmp_flow.tp_dst = htons(1); /* icmp code */
+
+ struct ovntrace_node *node = ovntrace_node_append(
+ super, OVNTRACE_NODE_TRANSFORMATION, "icmp");
+
+ trace_actions(on->nested, on->nested_len, dp, &icmp_flow,
+ table_id, pipeline, &node->subs);
+}
+
+static void
execute_get_mac_bind(const struct ovnact_get_mac_bind *bind,
const struct ovntrace_datapath *dp,
struct flow *uflow, struct ovs_list *super)
@@ -1888,6 +1911,11 @@ trace_actions(const struct ovnact *ovnacts, size_t ovnacts_len,
case OVNACT_LOG:
execute_log(ovnact_get_LOG(a), uflow, super);
break;
+
+ case OVNACT_ICMP:
+ execute_icmp(ovnact_get_ICMP(a), dp, uflow, table_id, pipeline,
+ super);
+ break;
}
}
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> --- ovn/utilities/ovn-trace.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)