Skip to content

Commit

Permalink
Merge "Do not swap ports for an ICMP packet inside an ICMP error" int…
Browse files Browse the repository at this point in the history
…o R2.22.x
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Mar 16, 2016
2 parents 869bd5e + a0c2b74 commit d219980
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dp-core/vr_proto_ip.c
Expand Up @@ -757,9 +757,11 @@ vr_inet_flow_swap(struct vr_flow *key_p)
unsigned short port;
unsigned int ipaddr;

port = key_p->flow4_sport;
key_p->flow4_sport = key_p->flow4_dport;
key_p->flow4_dport = port;
if (key_p->flow4_proto != VR_IP_PROTO_ICMP) {
port = key_p->flow4_sport;
key_p->flow4_sport = key_p->flow4_dport;
key_p->flow4_dport = port;
}

ipaddr = key_p->flow4_sip;
key_p->flow4_sip = key_p->flow4_dip;
Expand Down

0 comments on commit d219980

Please sign in to comment.