Blob Blame History Raw
From 4ea124c12b527457edc12dd1e65da2cc120ad928 Mon Sep 17 00:00:00 2001
From: Vasu Dev <vasu.dev@intel.com>
Date: Mon, 2 Feb 2015 15:12:37 -0800
Subject: [PATCH] fipvlan: do fipvlan only on specified interface

Skip interface not specified on the command line to block inadvertent
fcoe start on them.

This means now fipvlan will do VLAN discovery only on the specified
interfaces in non-auto mode and therefore in turn will start fcoe
only on them with -s option.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
---
 fipvlan.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/fipvlan.c b/fipvlan.c
index 9e494ee..288b011 100644
--- a/fipvlan.c
+++ b/fipvlan.c
@@ -841,9 +841,21 @@ static int send_vlan_requests(void)
 {
 	struct iff *iff;
 	int skipped = 0;
+	int i;
 
-	TAILQ_FOREACH(iff, &interfaces, list_node) {
-		skipped += probe_fip_interface(iff);
+	if (config.automode) {
+		TAILQ_FOREACH(iff, &interfaces, list_node) {
+			skipped += probe_fip_interface(iff);
+		}
+	} else {
+		for (i = 0; i < config.namec; i++) {
+			iff = lookup_iff(0, config.namev[i]);
+			if (!iff) {
+				skipped++;
+				continue;
+			}
+			skipped += probe_fip_interface(iff);
+		}
 	}
 	return skipped;
 }
-- 
2.1.0