From e343c9de8c3669912bb54a540ed7c0008e0fe677 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2015 07:25:20 +0000 Subject: import fcoe-utils-1.0.29-9.1.el7_1 --- diff --git a/SOURCES/fcoe-utils-v1.0.29-34-fipvlan-Start-FCoE-on-existing-VLAN.patch b/SOURCES/fcoe-utils-v1.0.29-34-fipvlan-Start-FCoE-on-existing-VLAN.patch new file mode 100644 index 0000000..0caa89a --- /dev/null +++ b/SOURCES/fcoe-utils-v1.0.29-34-fipvlan-Start-FCoE-on-existing-VLAN.patch @@ -0,0 +1,49 @@ +From a9f6a0633096b2d08ed61ddbbbbbf00b76f0e5ee Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 28 Jan 2015 17:26:09 +0000 +Subject: [PATCH] fipvlan: Start FCoE on existing VLAN + +If a VLAN already exists fipvlan wouldn't try to start FCoE here. + +Signed-off-by: Hannes Reinecke +Signed-off-by: Vasu Dev +--- + fipvlan.c | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) + +diff --git a/fipvlan.c b/fipvlan.c +index 1feb41d..4937173 100644 +--- a/fipvlan.c ++++ b/fipvlan.c +@@ -630,17 +630,18 @@ create_and_start_vlan(struct fcf *fcf, bool vn2vn) + if (vlan) { + FIP_LOG_DBG("VLAN %s.%d already exists as %s\n", + real_dev->ifname, fcf->vlan, vlan->ifname); +- return 0; ++ rc = 0; ++ } else { ++ snprintf(vlan_name, IFNAMSIZ, "%s.%d%s", ++ real_dev->ifname, fcf->vlan, config.suffix); ++ rc = vlan_create(fcf->ifindex, fcf->vlan, vlan_name); ++ if (rc < 0) ++ printf("Failed to create VLAN device %s\n\t%s\n", ++ vlan_name, strerror(-rc)); ++ else ++ printf("Created VLAN device %s\n", vlan_name); ++ return rc; + } +- snprintf(vlan_name, IFNAMSIZ, "%s.%d%s", +- real_dev->ifname, fcf->vlan, config.suffix); +- rc = vlan_create(fcf->ifindex, fcf->vlan, vlan_name); +- if (rc < 0) +- printf("Failed to create VLAN device %s\n\t%s\n", +- vlan_name, strerror(-rc)); +- else +- printf("Created VLAN device %s\n", vlan_name); +- return rc; + } + if (!config.start) + return rc; +-- +2.1.0 + diff --git a/SOURCES/fcoe-utils-v1.0.29-36-fipvlan-fix-broken-fcoe-start-using-fipvlan.patch b/SOURCES/fcoe-utils-v1.0.29-36-fipvlan-fix-broken-fcoe-start-using-fipvlan.patch new file mode 100644 index 0000000..027b506 --- /dev/null +++ b/SOURCES/fcoe-utils-v1.0.29-36-fipvlan-fix-broken-fcoe-start-using-fipvlan.patch @@ -0,0 +1,51 @@ +From 94f12a1f78b86ff0c597c29c91d020732ce68df3 Mon Sep 17 00:00:00 2001 +From: Vasu Dev +Date: Fri, 30 Jan 2015 14:29:19 -0800 +Subject: [PATCH] fipvlan: fix broken fcoe start using fipvlan + +FCoE start is broken due to the link being never selected and that +is in turn due to bad vlan interface name compare against real +interface name passed for fip vlan discovery. + +This name compare is unnecessary and breaks fipvlan start option, +so this patch removes it to have fcoe start working again. + +I considered reducing compare to just the base real interface name +but that won't work in the case of existing vlan interface name is +already customized, so instead just don't check for the name. + +I verified this fixes the start using newly created vlan as well +as existing vlan, which could be down or already running. + +Signed-off-by: Vasu Dev +--- + fipvlan.c | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/fipvlan.c b/fipvlan.c +index 4937173..9e494ee 100644 +--- a/fipvlan.c ++++ b/fipvlan.c +@@ -448,19 +448,6 @@ static void rtnl_recv_newlink(struct nlmsghdr *nh) + memcpy(iff->mac_addr, RTA_DATA(ifla[IFLA_ADDRESS]), ETHER_ADDR_LEN); + strncpy(iff->ifname, RTA_DATA(ifla[IFLA_IFNAME]), IFNAMSIZ); + +- if (!config.automode) { +- int i, iff_selected = 0; +- +- for (i = 0; i < config.namec; i++) { +- if (!strcmp(iff->ifname, config.namev[i])) +- iff_selected = 1; +- } +- if (!iff_selected) { +- FIP_LOG_DBG("ignoring if %s\n", iff->ifname); +- free(iff); +- return; +- } +- } + if (ifla[IFLA_LINKINFO]) { + parse_linkinfo(linkinfo, ifla[IFLA_LINKINFO]); + /* Track VLAN devices separately */ +-- +2.1.0 + diff --git a/SOURCES/fcoe-utils-v1.0.29-37-fipvlan-do-fipvlan-only-on-specified-interface.patch b/SOURCES/fcoe-utils-v1.0.29-37-fipvlan-do-fipvlan-only-on-specified-interface.patch new file mode 100644 index 0000000..10cc4cc --- /dev/null +++ b/SOURCES/fcoe-utils-v1.0.29-37-fipvlan-do-fipvlan-only-on-specified-interface.patch @@ -0,0 +1,48 @@ +From 4ea124c12b527457edc12dd1e65da2cc120ad928 Mon Sep 17 00:00:00 2001 +From: Vasu Dev +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 +--- + 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 + diff --git a/SOURCES/fcoe-utils-v1.0.30-3-sanmac-isn-t-required.patch b/SOURCES/fcoe-utils-v1.0.30-3-sanmac-isn-t-required.patch new file mode 100644 index 0000000..67c583e --- /dev/null +++ b/SOURCES/fcoe-utils-v1.0.30-3-sanmac-isn-t-required.patch @@ -0,0 +1,26 @@ +From 8065e01707c3306380c684712e547fcf0e4e55da Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Thu, 5 Feb 2015 11:46:31 -0800 +Subject: [PATCH] sanmac isn't required + +Signed-off-by: Chris Leech +--- + lib/fip.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/fip.c b/lib/fip.c +index 6657b61..5e5b179 100644 +--- a/lib/fip.c ++++ b/lib/fip.c +@@ -215,7 +215,7 @@ int fip_socket(int ifindex, enum fip_multi multi) + return s; + + rc = fip_socket_sanmac(s, ifindex, 1); +- if (rc < 0) { ++ if (rc < 0 && rc != -ENXIO) { + close(s); + return rc; + } +-- +2.1.0 + diff --git a/SPECS/fcoe-utils.spec b/SPECS/fcoe-utils.spec index 2272782..051b0c8 100644 --- a/SPECS/fcoe-utils.spec +++ b/SPECS/fcoe-utils.spec @@ -3,7 +3,7 @@ Name: fcoe-utils Version: 1.0.29 -Release: 9%{?dist} +Release: 9.1%{?dist} Summary: Fibre Channel over Ethernet utilities Group: Applications/System License: GPLv2 @@ -18,6 +18,11 @@ Patch1: fcoe-utils-1.0.29-29-g9267509.patch Patch2: fcoe-utils-1.0.29-pass-flags-to-fcoemon-to-enable-vn2vn-mode.patch Patch3: 0001-fipvlan-allow-fcf-lookup-without-MAC.patch Patch4: 0002-fipvlan-segfault-return-after-vlan-create-in-create_.patch +Patch5: fcoe-utils-v1.0.29-34-fipvlan-Start-FCoE-on-existing-VLAN.patch +Patch6: fcoe-utils-v1.0.29-36-fipvlan-fix-broken-fcoe-start-using-fipvlan.patch +Patch7: fcoe-utils-v1.0.29-37-fipvlan-do-fipvlan-only-on-specified-interface.patch +Patch8: fcoe-utils-v1.0.30-3-sanmac-isn-t-required.patch + BuildRequires: autoconf BuildRequires: automake BuildRequires: libhbaapi-devel >= 2.2.9-6 @@ -45,6 +50,10 @@ cp -v %{SOURCE1} quickstart.txt %patch2 -p1 -b .vn2vn %patch3 -p1 -b .lookup_fcf %patch4 -p1 -b .create_and_start_vlan +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 %build ./bootstrap.sh @@ -93,6 +102,9 @@ sed -i -e 's/SUPPORTED_DRIVERS="libfc fcoe bnx2fc"/SUPPORTED_DRIVERS="libfc fcoe %{_libexecdir}/fcoe/ %changelog +* Tue Sep 08 2015 Chris Leech - 1.0.29-9.1 +- 1259565 fipvlan fixes + * Wed Jan 21 2015 Chris Leech - 1.0.29-9 - 1184386 fix segfault on fipvlan create