Skip to content

Commit

Permalink
Merge "Pull the SCTP header in the ICMP error headers to Head SKB"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jun 22, 2016
2 parents e5948e1 + b75400b commit da6fea3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 8 additions & 6 deletions dp-core/vr_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ vr_ip_proto_pull(struct vr_ip *iph)
{
unsigned char proto = iph->ip_proto;

if ((proto == VR_IP_PROTO_TCP) ||
(proto == VR_IP_PROTO_UDP) ||
(proto == VR_IP_PROTO_ICMP)) {
if ((proto == VR_IP_PROTO_TCP) || (proto == VR_IP_PROTO_UDP) ||
(proto == VR_IP_PROTO_ICMP) || (proto == VR_IP_PROTO_SCTP)) {
return true;
}

Expand All @@ -56,9 +55,8 @@ vr_ip6_proto_pull(struct vr_ip6 *ip6h)
{
unsigned char proto = ip6h->ip6_nxt;

if ((proto == VR_IP_PROTO_TCP) ||
(proto == VR_IP_PROTO_UDP) ||
(proto == VR_IP_PROTO_ICMP6)) {
if ((proto == VR_IP_PROTO_TCP) || (proto == VR_IP_PROTO_UDP) ||
(proto == VR_IP_PROTO_ICMP6) || (proto == VR_IP_PROTO_SCTP)) {
return true;
}

Expand Down Expand Up @@ -177,6 +175,8 @@ vr_ip_transport_parse(struct vr_ip *iph, struct vr_ip6 *ip6h,
pull_len += sizeof(struct vr_tcp);
else if (icmp_pl_iph->ip_proto == VR_IP_PROTO_UDP)
pull_len += sizeof(struct vr_udp);
else if (icmp_pl_iph->ip_proto == VR_IP_PROTO_SCTP)
pull_len += sizeof(struct vr_sctp);
else
pull_len += sizeof(struct vr_icmp);

Expand Down Expand Up @@ -218,6 +218,8 @@ vr_ip_transport_parse(struct vr_ip *iph, struct vr_ip6 *ip6h,
pull_len += sizeof(struct vr_tcp);
else if (icmp_pl_ip6h->ip6_nxt == VR_IP_PROTO_UDP)
pull_len += sizeof(struct vr_udp);
else if (icmp_pl_ip6h->ip6_nxt == VR_IP_PROTO_SCTP)
pull_len += sizeof(struct vr_sctp);
else
pull_len += sizeof(struct vr_icmp);

Expand Down
4 changes: 4 additions & 0 deletions linux/vrouter_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,8 @@ lh_pull_inner_headers(struct vr_packet *pkt,
pull_len += sizeof(struct vr_tcp);
else if (icmp_pl_ip_proto == VR_IP_PROTO_UDP)
pull_len += sizeof(struct vr_udp);
else if (icmp_pl_ip_proto == VR_IP_PROTO_SCTP)
pull_len += sizeof(struct vr_sctp);
else
pull_len += sizeof(struct vr_icmp);

Expand Down Expand Up @@ -1862,6 +1864,8 @@ lh_pull_inner_headers(struct vr_packet *pkt,
pull_len += sizeof(struct vr_tcp);
else if (icmp_pl_ip_proto == VR_IP_PROTO_UDP)
pull_len += sizeof(struct vr_udp);
else if (icmp_pl_ip_proto == VR_IP_PROTO_SCTP)
pull_len += sizeof(struct vr_sctp);
else
pull_len += sizeof(struct vr_icmp);

Expand Down

0 comments on commit da6fea3

Please sign in to comment.