From 4928317cf1975fce73912935d9a6f02afbdf26fb Mon Sep 17 00:00:00 2001 From: "Anand H. Krishnan" Date: Fri, 22 Jul 2016 10:11:36 +0530 Subject: [PATCH] Do not create new flows for ICMP6 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: I601886aeb3fa4a50a057f2c982f8c7b19dd7e3d1 Closes-Bug: #1556363 --- dp-core/vr_proto_ip6.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dp-core/vr_proto_ip6.c b/dp-core/vr_proto_ip6.c index 3051a6168..49df82409 100644 --- a/dp-core/vr_proto_ip6.c +++ b/dp-core/vr_proto_ip6.c @@ -195,8 +195,7 @@ vr_inet6_form_flow(struct vrouter *router, unsigned short vrf, return -1; } - sport = flow_p->flow6_sport; - dport = flow_p->flow6_dport; + return 0; } else if ((icmph->icmp_type == VR_ICMP6_TYPE_ECHO_REQ) || (icmph->icmp_type == VR_ICMP6_TYPE_ECHO_REPLY)) { sport = icmph->icmp_eid;