From da37ebac7ab40ad6f9fe78ff1d218c43957f69e8 Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Tue, 24 May 2011 15:12:13 -0700 Subject: [PATCH] ofproto: Fix possible core dump during flow revalidation. This patch also prevents OVS from forwarding any LACP packets whether or not LACP is enabled. This is consistent with the pre-next behavior. Bug #5738. --- ofproto/ofproto-dpif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index f44e1642..d41c584e 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1545,19 +1545,19 @@ process_special(struct ofproto_dpif *ofproto, const struct flow *flow, { if (cfm_should_process_flow(flow)) { struct ofport_dpif *ofport = get_ofp_port(ofproto, flow->in_port); - if (ofport && ofport->cfm) { + if (packet && ofport && ofport->cfm) { cfm_process_heartbeat(ofport->cfm, packet); } return true; } else if (flow->dl_type == htons(ETH_TYPE_LACP)) { struct ofport_dpif *port = get_ofp_port(ofproto, flow->in_port); - if (port && port->bundle && port->bundle->lacp) { + if (packet && port && port->bundle && port->bundle->lacp) { const struct lacp_pdu *pdu = parse_lacp_packet(packet); if (pdu) { lacp_process_pdu(port->bundle->lacp, port, pdu); } - return true; } + return true; } return false; } -- 2.30.2