Blame SOURCES/0001-fipvlan-allow-fcf-lookup-without-MAC.patch

ebec02
From 885787d1eed7e0245afcd7ac39f9484202edb23c Mon Sep 17 00:00:00 2001
ebec02
From: Chris Leech <cleech@redhat.com>
ebec02
Date: Thu, 22 Jan 2015 12:51:21 +0800
ebec02
Subject: [PATCH V2 1/2] fipvlan: allow fcf lookup without MAC
ebec02
ebec02
This fixes a segfault where there's a lookup_fcf call with mac hard set to NULL
ebec02
ebec02
The MACs not really needed, as fipvlan doesn't use the FCF information at all -
ebec02
it just picks a VLAN and then FCF selection happens from the kernel FIP code
ebec02
once activated.
ebec02
---
ebec02
 fipvlan.c | 7 ++++---
ebec02
 1 file changed, 4 insertions(+), 3 deletions(-)
ebec02
ebec02
diff --git a/fipvlan.c b/fipvlan.c
ebec02
index cc71412..211da53 100644
ebec02
--- a/fipvlan.c
ebec02
+++ b/fipvlan.c
ebec02
@@ -168,9 +168,10 @@ static struct fcf *lookup_fcf(struct fcf_list_head *head, int ifindex,
ebec02
 	struct fcf *fcf;
ebec02
 
ebec02
 	TAILQ_FOREACH(fcf, head, list_node)
ebec02
-		if ((ifindex == fcf->ifindex) && (vlan == fcf->vlan) &&
ebec02
-		    (memcmp(mac, fcf->mac_addr, ETHER_ADDR_LEN) == 0))
ebec02
-			return fcf;
ebec02
+		if ((ifindex == fcf->ifindex) && (vlan == fcf->vlan)) {
ebec02
+			if ((!mac) || (memcmp(mac, fcf->mac_addr, ETHER_ADDR_LEN) == 0))
ebec02
+				return fcf;
ebec02
+		}
ebec02
 	return NULL;
ebec02
 }
ebec02
 
ebec02
-- 
ebec02
2.1.0
ebec02