From 9865b6e5110060f4664a99804f1361cf094e3e52 Mon Sep 17 00:00:00 2001 From: "Anand H. Krishnan" Date: Thu, 23 Apr 2015 16:43:40 +0530 Subject: [PATCH] For non tcp/udp/icmp/sctp protocols, port values used in the five tuple of the flow key should be 0 Closes-BUG: #1447558 Conflicts: dp-core/vr_proto_ip6.c Change-Id: Ie165da334f5f6e4126bc375a9d3652d0bda6cff9 --- dp-core/vr_proto_ip.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dp-core/vr_proto_ip.c b/dp-core/vr_proto_ip.c index 543126761..29a875b42 100644 --- a/dp-core/vr_proto_ip.c +++ b/dp-core/vr_proto_ip.c @@ -857,9 +857,13 @@ vr_inet_proto_flow(struct vrouter *router, unsigned short vrf, sport = 0; dport = icmph->icmp_type; } - } else { + } else if ((ip->ip_proto == VR_IP_PROTO_TCP) || + (ip->ip_proto == VR_IP_PROTO_UDP)) { sport = *t_hdr; dport = *(t_hdr + 1); + } else { + sport = 0; + dport = 0; } nh_id = vr_inet_flow_nexthop(pkt, vlan);