From 46f9fa8521d4c1f79a665ecebb79b11987de987f Mon Sep 17 00:00:00 2001 From: Ganesan Prabhakaran Date: Fri, 17 Oct 2014 13:57:35 -0700 Subject: [PATCH] Fixes PR 1382402, ICMPv6 Packet Too Big not sent Set the ipv6 next-header value correctly when responding with Packet Too Big message. In the absence of this, the response goes with whatever is the next header value in the received packet and fails if it is not icmpv6 (TCP, Frag-header etc). In the ping -s 1500 case mentioned in the PR, the next-header was frag-header. Change-Id: If921d4609fe54c576bfe314eebbd08e889530b18 Closes-bug: 1382402 --- dp-core/vr_proto_ip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dp-core/vr_proto_ip.c b/dp-core/vr_proto_ip.c index b207f961f..bdacf5009 100644 --- a/dp-core/vr_proto_ip.c +++ b/dp-core/vr_proto_ip.c @@ -156,7 +156,8 @@ vr_forward(struct vrouter *router, unsigned short vrf, if (vif) { if (vif->vif_type == VIF_TYPE_PHYSICAL) { - encap_len = sizeof(struct vr_eth) + sizeof(struct vr_ip)+ sizeof(struct vr_udp) +sizeof(unsigned int); + encap_len = sizeof(struct vr_eth) + sizeof(struct vr_ip) + + sizeof(struct vr_udp) +sizeof(unsigned int); } if (family == AF_INET) { @@ -187,6 +188,7 @@ vr_forward(struct vrouter *router, unsigned short vrf, memcpy(outer_ip6->ip6_dst, ip6->ip6_src, 16); memcpy(outer_ip6->ip6_src, ip6->ip6_dst, 16); outer_ip6->ip6_src[15] = 0xff; //Mimic the GW IP as the src IP + outer_ip6->ip6_nxt = VR_IP_PROTO_ICMP6; if (pkt->vp_if->vif_mtu >= (plen + 2*sizeof(struct vr_ip6) + sizeof(struct vr_icmp))) {