From 354f7e27278b6565f39b3ae116442cd83bb355ad Mon Sep 17 00:00:00 2001 From: "Anand H. Krishnan" Date: Thu, 7 Jul 2016 16:30:49 +0530 Subject: [PATCH] Do not create new flows for ICMP errors Bug fix for 1556363 have reintroduced the issue of creating new flows for ICMP errors. It looks like a cherry-pick/merge problem, since the issue is present only in the mainline branch. The process of forming the flow key is a recursive call for ICMP error, since we look into the inner packet that caused the ICMP error. Once we process the inner packet and form the flow key, we should return immediately rather than continuing with the parent function, since the parent will start using the ICMP error packet for formation of the flow key. Change-Id: I41c92ad44477c771e694661e625c39ff529bbe4a Closes-BUG: #1556363 --- dp-core/vr_proto_ip.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dp-core/vr_proto_ip.c b/dp-core/vr_proto_ip.c index 7566fc58f..7a1f23c91 100644 --- a/dp-core/vr_proto_ip.c +++ b/dp-core/vr_proto_ip.c @@ -868,8 +868,7 @@ vr_inet_proto_flow(struct vrouter *router, unsigned short vrf, return -1; } - sport = flow_p->flow4_sport; - dport = flow_p->flow4_dport; + return 0; } else if (vr_icmp_echo(icmph)) { sport = icmph->icmp_eid; dport = VR_ICMP_TYPE_ECHO_REPLY;