Skip to content

Commit

Permalink
Fixes PR 1382402, ICMPv6 Packet Too Big not sent
Browse files Browse the repository at this point in the history
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
  • Loading branch information
prabix76 committed Oct 17, 2014
1 parent 4224f76 commit 46f9fa8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dp-core/vr_proto_ip.c
Expand Up @@ -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) {
Expand Down Expand Up @@ -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))) {
Expand Down

0 comments on commit 46f9fa8

Please sign in to comment.