From 875e797700e7a617b8382126ec30fd7d133fa2e3 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:33:38 +0000 Subject: import fcoe-utils-1.0.32-1.el7 --- diff --git a/.fcoe-utils.metadata b/.fcoe-utils.metadata index b11c9ca..a68279a 100644 --- a/.fcoe-utils.metadata +++ b/.fcoe-utils.metadata @@ -1 +1 @@ -d5fea62807b108aaeb7ae9dee814c3e0249a5ffd SOURCES/fcoe-utils-1.0.31.tar.gz +af94ad7bd13d0828be6246f46f04b3b7d6a1ad0a SOURCES/fcoe-utils-1.0.32.tar.gz diff --git a/.gitignore b/.gitignore index a3e047a..e1447d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/fcoe-utils-1.0.31.tar.gz +SOURCES/fcoe-utils-1.0.32.tar.gz 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 deleted file mode 100644 index 67c583e..0000000 --- a/SOURCES/fcoe-utils-v1.0.30-3-sanmac-isn-t-required.patch +++ /dev/null @@ -1,26 +0,0 @@ -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/SOURCES/fcoe-utils-v1.0.31-1-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch b/SOURCES/fcoe-utils-v1.0.31-1-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch deleted file mode 100644 index 84c8af1..0000000 --- a/SOURCES/fcoe-utils-v1.0.31-1-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 0231b0c71464af17a0cf392e55174c97a5986640 Mon Sep 17 00:00:00 2001 -From: "Milan P. Gandhi" -Date: Mon, 28 Mar 2016 12:52:12 +0000 -Subject: [PATCH] fcoemon.c: Add a check to verify if dcbd is to be - initialized, else do not try to connect to dcbd/lldpad - -Some of the FCoE capable adapters e.g. BCM57810 network interfaces -has DCBX/LLDP client on-chip, and kernel documentation recommends -to keep software based DCBX/LLDP clients (e.g. lldpad) disabled. -https://www.kernel.org/doc/Documentation/scsi/bnx2fc.txt - -It was found that, if lldpad is disabled while using above interfaces, -then fcoemon shows following errors every 10 seconds: - -fcoemon: error 111 Connection refused -fcoemon: Failed to connect to lldpad - -Below patch checks each interface configuration in /etc/fcoe/cfg-ethX -file to verify if there is at least 1 interface with DCB_REQUIRED flag -set to yes and will try to initialize dcbd only if there is at least 1 -interface with DCB_REQUIRED="yes", else fcoemon will not try to -initialize dcbd or connect to lldpad, thus eliminating above errors: - -Signed-off-by: Milan P. Gandhi -Reviewed-by: Johannes Thumshirn -Reviewed-by: Laurence Oberman -Tested-by: Laurence Oberman -Reviewed-by: Johannes Thumshirn -Signed-off-by: Vasu Dev ---- - fcoemon.c | 7 ++++++- - fcoemon.h | 1 + - 2 files changed, 7 insertions(+), 1 deletion(-) - -diff --git a/fcoemon.c b/fcoemon.c -index 91d12c7..d84d1e5 100644 ---- a/fcoemon.c -+++ b/fcoemon.c -@@ -557,6 +557,9 @@ static int fcm_read_config_files(void) - if (!strncasecmp(val, "yes", 3) && rc == 1) - next->dcb_required = 1; - -+ if (next->dcb_required == 1 && fcoe_config.dcb_init == 0) -+ fcoe_config.dcb_init = 1; -+ - /* AUTO_VLAN */ - rc = fcm_read_config_variable(file, val, sizeof(val), - fp, CFG_IF_VAR_AUTOVLAN); -@@ -3768,7 +3771,9 @@ int main(int argc, char **argv) - if (rc != 0) - goto err_cleanup; - -- fcm_dcbd_init(); -+ if (fcoe_config.dcb_init) -+ fcm_dcbd_init(); -+ - rc = fcm_srv_create(&srv_info); - if (rc != 0) - goto err_cleanup; -diff --git a/fcoemon.h b/fcoemon.h -index 3869bae..0e0e6a2 100644 ---- a/fcoemon.h -+++ b/fcoemon.h -@@ -25,6 +25,7 @@ - struct fcoe_config { - int debug; - int use_syslog; -+ int dcb_init; - struct fcoe_port *port; - } fcoe_config; - --- -2.5.5 - diff --git a/SOURCES/fcoe-utils-v1.0.31-2-fcoeadm-Fix-possible-buffer-overflows.patch b/SOURCES/fcoe-utils-v1.0.31-2-fcoeadm-Fix-possible-buffer-overflows.patch deleted file mode 100644 index 91cfa33..0000000 --- a/SOURCES/fcoe-utils-v1.0.31-2-fcoeadm-Fix-possible-buffer-overflows.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 5dfd3e4fab6cc4261112ad6a6839d4eb584cacfc Mon Sep 17 00:00:00 2001 -From: Johannes Thumshirn -Date: Wed, 15 Jun 2016 22:47:41 +0000 -Subject: [PATCH] fcoeadm: Fix possible buffer overflows - -Fix 3 possible buffer overflows when strncat()ing strings together. - -Signed-off-by: Johannes Thumshirn -Signed-off-by: Vasu Dev ---- - fcoeadm_display.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/fcoeadm_display.c b/fcoeadm_display.c -index 16ccb6b..7b95aa4 100644 ---- a/fcoeadm_display.c -+++ b/fcoeadm_display.c -@@ -267,13 +267,13 @@ static void show_full_lun_info(unsigned int hba, unsigned int port, - if (!port_attrs) - goto free_rport; - -- strncat(path, "/device/", sizeof(path)); -+ strncat(path, "/device/", sizeof(path) - strlen(path) - 1); - - sa_sys_read_line(path, "rev", rev, sizeof(rev)); - sa_sys_read_line(path, "model", model, sizeof(model)); - sa_sys_read_line(path, "vendor", vendor, sizeof(vendor)); - -- strncat(path, "block", sizeof(path)); -+ strncat(path, "block", sizeof(path) - strlen(path) - 1); - - dir = opendir(path); - if (!dir) -@@ -349,7 +349,7 @@ static void show_short_lun_info(unsigned int hba, unsigned int port, - sa_sys_read_line(path, "model", model, sizeof(model)); - sa_sys_read_line(path, "vendor", vendor, sizeof(vendor)); - -- strncat(path, "block", sizeof(path)); -+ strncat(path, "block", sizeof(path) - strlen(path) - 1); - - dir = opendir(path); - if (!dir) --- -2.5.5 - diff --git a/SOURCES/fcoe-utils-v1.0.31-9-fcoeadm-target-segfault-with-other-FC-storage-presen.patch b/SOURCES/fcoe-utils-v1.0.31-9-fcoeadm-target-segfault-with-other-FC-storage-presen.patch deleted file mode 100644 index 2ea22a9..0000000 --- a/SOURCES/fcoe-utils-v1.0.31-9-fcoeadm-target-segfault-with-other-FC-storage-presen.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 9b295b18014a8fdc05acf6ceb9343c5c1e2ae716 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Thu, 20 Oct 2016 13:56:43 -0700 -Subject: fcoeadm: --target segfault with other FC storage present - -fcoeadm is segfaulting when trying to parse sysfs paths to rports for -traditional FC or non fcoe-utils/libfc FCoE. - -I also changed search_rports to just ignore these instead of returning -an error, so that the target information for all fcoe-utils managed -storage can be displayed instead of stopping at the first exception. - -Signed-off-by: Chris Leech -Signed-off-by: Johannes Thumshirn ---- - fcoeadm_display.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/fcoeadm_display.c b/fcoeadm_display.c -index 096fe50..120c608 100644 ---- a/fcoeadm_display.c -+++ b/fcoeadm_display.c -@@ -660,17 +660,19 @@ static char *get_ifname_from_rport(char *rport) - - err = asprintf(&path, "%s/%s", "/sys/class/fc_remote_ports", rport); - if (err == -1) -- return false; -+ return NULL; - - ret = readlink(path, link, sizeof(link)); - free(path); - if (ret == -1) -- return false; -+ return NULL; - - if (link[ret] != '\0') - link[ret] = '\0'; - - offs = strstr(link, "/net/"); -+ if (!offs) -+ return NULL; - - offs = offs + 5; - -@@ -778,7 +780,7 @@ static int search_rports(struct dirent *dp, void *arg) - } else { - ifname = get_ifname_from_rport(rport); - if (!ifname) -- return -ENOMEM; -+ return 0; - allocated = true; - } - --- -2.9.3 - diff --git a/SPECS/fcoe-utils.spec b/SPECS/fcoe-utils.spec index ca57c81..b2a7d15 100644 --- a/SPECS/fcoe-utils.spec +++ b/SPECS/fcoe-utils.spec @@ -1,36 +1,28 @@ # https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags %define _hardened_build 1 -%global checkout 5dfd3e4 +%global checkout f5cbb9a Name: fcoe-utils -Version: 1.0.31 -Release: 1.git%{checkout}%{?dist}.1 +Version: 1.0.32 +Release: 1%{?dist} Summary: Fibre Channel over Ethernet utilities Group: Applications/System License: GPLv2 URL: http://www.open-fcoe.org -# git://open-fcoe.org/fcoe/fcoe-utils.git Source0: https://github.com/morbidrsa/fcoe-utils/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: quickstart.txt Source2: fcoe.service Source3: fcoe.config Source4: README.redhat ExcludeArch: ppc s390 -Patch1: fcoe-utils-v1.0.31-1-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch -Patch2: fcoe-utils-v1.0.31-2-fcoeadm-Fix-possible-buffer-overflows.patch -Patch3: fcoe-utils-v1.0.30-3-sanmac-isn-t-required.patch -Patch4: fcoe-utils-v1.0.31-9-fcoeadm-target-segfault-with-other-FC-storage-presen.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libpciaccess-devel -#BuildRequires: libhbaapi-devel >= 2.2.9-6 -#BuildRequires: libhbalinux-devel >= 1.0.17-1 BuildRequires: libtool BuildRequires: lldpad-devel >= 0.9.43 BuildRequires: systemd Requires: lldpad >= 0.9.43 -#Requires: libhbalinux >= 1.0.16-4 Requires: iproute Requires: device-mapper-multipath Requires(post): systemd @@ -95,8 +87,9 @@ sed -i -e 's/SUPPORTED_DRIVERS="libfc fcoe bnx2fc"/SUPPORTED_DRIVERS="libfc fcoe %{_libexecdir}/fcoe/ %changelog -* Fri Feb 24 2017 Chris Leech - 1.0.31-1.git5dfd3e4.el7_3.1 -- 1426634 fix core dump when running fcoeadm -t with non-libfc FC/FCoE storage +* Wed Feb 22 2017 Chris Leech - 1.0.32-1 +- 1384707 fcoeadm --target segfaults if non-FCoE FC targets are present +- 1321611 fcoemon should only try to connect to lldpad when required * Fri Aug 19 2016 Chris Leech - 1.0.31-1.git5dfd3e4 - 1274530 rebase to upstream 1.0.31+