Navigation Menu

Skip to content

Commit

Permalink
GRE tunneled packet on fabric interface crashing vrouter kernel when
Browse files Browse the repository at this point in the history
the GRE tunnel is not configured on the interface. Reworked how the
relaxed policy check is enforeced int he code to avoid crashing. Crash
happened because packet processing went into a loop in vr_ip_rcv().

Change-Id: I6de49c70a30393c9d752273880b31f415dca1aa5
closes-bug: #1773979
  • Loading branch information
Saurabh Gupta committed Jun 29, 2018
1 parent ff62bf8 commit d459a4a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dp-core/vr_proto_ip.c
Expand Up @@ -492,6 +492,7 @@ vr_ip_rcv(struct vrouter *router, struct vr_packet *pkt,
struct vr_forwarding_md *fmd)
{
bool flow_processing = false;
bool relaxed_policy_found = false;
unsigned int hlen;
unsigned short drop_reason, l4_port = 0;
int unhandled = 1;
Expand Down Expand Up @@ -580,8 +581,10 @@ vr_ip_rcv(struct vrouter *router, struct vr_packet *pkt,
}

if (l4_port && vr_valid_link_local_port(router, AF_INET,
ip->ip_proto, ntohs(l4_port)))
ip->ip_proto, ntohs(l4_port))) {
flow_processing = true;
relaxed_policy_found = true;
}
}
}
}
Expand All @@ -606,7 +609,7 @@ vr_ip_rcv(struct vrouter *router, struct vr_packet *pkt,
* gets marked in fmd_to_me, lets subject it l3
* processing again.
*/
if (fmd->fmd_to_me || (pkt->vp_nh->nh_flags & NH_FLAG_RELAXED_POLICY)) {
if (fmd->fmd_to_me || relaxed_policy_found) {
if (!vr_l3_input(pkt, fmd)) {
drop_reason = VP_DROP_NOWHERE_TO_GO;
goto drop_pkt;
Expand Down

0 comments on commit d459a4a

Please sign in to comment.