In future patches, ofproto-dpif-xlate may be temporarily out of
sync with ofproto-dpif proper, and pass an unknown ofport to
lacp_process_packet().  This patch handles that edge case
gracefully.

Signed-off-by: Ethan Jackson <et...@nicira.com>
---
 lib/lacp.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/lacp.c b/lib/lacp.c
index 9daca3b..9faeead 100644
--- a/lib/lacp.c
+++ b/lib/lacp.c
@@ -279,6 +279,10 @@ lacp_process_packet(struct lacp *lacp, const void *slave_,
     const struct lacp_pdu *pdu;
     long long int tx_rate;
 
+    if (!slave) {
+        return;
+    }
+
     pdu = parse_lacp_packet(packet);
     if (!pdu) {
         VLOG_WARN_RL(&rl, "%s: received an unparsable LACP PDU.", lacp->name);
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to