update to 1.0.32

patch to fix up rawhide/gcc7 build errors due to Werror=format-truncation
This commit is contained in:
Chris Leech 2017-02-09 11:00:02 -08:00
parent ce30a4eb90
commit 072cb4d245
9 changed files with 63 additions and 1556 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,45 +0,0 @@
From 50e1aaa1b8b6856a890ae3f036ae9439b24c40c3 Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Fri, 24 Oct 2014 14:36:53 -0700
Subject: [PATCH] pass flags to fcoemon to enable vn2vn mode
---
fcoeadm.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fcoeadm.c b/fcoeadm.c
index 07ff690..776b4e3 100644
--- a/fcoeadm.c
+++ b/fcoeadm.c
@@ -286,7 +286,7 @@ int main(int argc, char *argv[])
}
ifname = argv[optind];
- rc = fcoeadm_action(cmd, ifname, CLIF_FLAGS_NONE);
+ rc = fcoeadm_action(cmd, ifname, flags);
break;
case 'r':
cmd = CLIF_RESET_CMD;
@@ -303,8 +303,7 @@ int main(int argc, char *argv[])
ifname = argv[optind];
rc = fcoe_validate_fcoe_conn(ifname);
if (!rc)
- rc = fcoeadm_action(cmd, ifname,
- CLIF_FLAGS_NONE);
+ rc = fcoeadm_action(cmd, ifname, flags);
break;
case 'i':
@@ -405,8 +404,7 @@ int main(int argc, char *argv[])
rc = display_port_stats(ifname, stat_interval);
break;
case 'p':
- rc = fcoeadm_action(CLIF_PID_CMD, NULL,
- CLIF_FLAGS_NONE);
+ rc = fcoeadm_action(CLIF_PID_CMD, NULL, flags);
break;
case 'b':
--
1.9.3

View File

@ -0,0 +1,53 @@
diff --git a/fipvlan.c b/fipvlan.c
index 7c00c7c..065b742 100644
--- a/fipvlan.c
+++ b/fipvlan.c
@@ -621,8 +621,10 @@ create_and_start_vlan(struct fcf *fcf, bool vn2vn)
real_dev->ifname, fcf->vlan, vlan->ifname);
rc = 0;
} else {
- snprintf(vlan_name, IFNAMSIZ, "%s.%d%s",
- real_dev->ifname, fcf->vlan, config.suffix);
+ rc = snprintf(vlan_name, IFNAMSIZ, "%s.%d%s",
+ real_dev->ifname, fcf->vlan, config.suffix);
+ if (rc >= IFNAMSIZ)
+ return -E2BIG;
rc = vlan_create(fcf->ifindex, fcf->vlan, vlan_name);
if (rc < 0)
printf("Failed to create VLAN device %s\n\t%s\n",
diff --git a/libopenfcoe.c b/libopenfcoe.c
index 07090d5..98fb975 100644
--- a/libopenfcoe.c
+++ b/libopenfcoe.c
@@ -59,6 +59,7 @@ static int add_fcoe_fcf_device(struct dirent *dp, void *arg)
{
struct fcoe_ctlr_device *ctlr = (struct fcoe_ctlr_device *)arg;
struct fcoe_fcf_device *fcf;
+ int rc;
if (!strstr(dp->d_name, "fcf") ||
(!strcmp(dp->d_name, "fcf_dev_loss_tmo")))
@@ -71,8 +72,10 @@ static int add_fcoe_fcf_device(struct dirent *dp, void *arg)
memset(fcf, 0, sizeof(struct fcoe_fcf_device));
/* Save the path */
- snprintf(fcf->path, sizeof(fcf->path),
- "%s/%s", ctlr->path, dp->d_name);
+ rc = snprintf(fcf->path, sizeof(fcf->path),
+ "%s/%s", ctlr->path, dp->d_name);
+ if (rc >= sizeof(fcf->path))
+ goto fail;
/* Use the index from the logical enumeration */
fcf->index = atoi(dp->d_name + sizeof("fcf_") - 1);
@@ -198,7 +201,9 @@ static int read_fcoe_ctlr_device(struct dirent *dp, void *arg)
sa_sys_read_line(ctlr->path, "mode", buf, sizeof(buf));
sa_enum_encode(fip_conn_type_table, buf, &ctlr->mode);
- snprintf(lesb_path, sizeof(lesb_path), "%s/lesb/", ctlr->path);
+ rc = snprintf(lesb_path, sizeof(lesb_path), "%s/lesb/", ctlr->path);
+ if (rc >= sizeof(lesb_path))
+ goto fail;
/* Get LESB statistics */
sa_sys_read_u32(lesb_path, "link_fail",

View File

@ -1,78 +0,0 @@
From f3af6bad75d7f6c90b9a170cbf9e4748ab4bb24e Mon Sep 17 00:00:00 2001
From: Johannes Thumshirn <jthumshirn@suse.de>
Date: Mon, 18 May 2015 17:02:59 +0000
Subject: [PATCH] fcoemon: Rework daemonizing and error handling
Rework error handling, which leads to daemonizing later in order to get the
error handling into effect.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
---
fcoemon.c | 31 ++++++++++++++++++++++---------
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/fcoemon.c b/fcoemon.c
index 3b5210c..c5edd1b 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -3719,11 +3719,6 @@ int main(int argc, char **argv)
if (argc != optind)
fcm_usage();
- if (!fcm_fg && daemon(0, !fcoe_config.use_syslog)) {
- FCM_LOG("Starting daemon failed");
- exit(EXIT_FAILURE);
- }
-
umask(0);
/*
@@ -3770,22 +3765,40 @@ int main(int argc, char **argv)
}
fcm_fcoe_init();
- fcm_fc_events_init();
- fcm_link_init(); /* NETLINK_ROUTE protocol */
+ rc = fcm_fc_events_init();
+ if (rc != 0)
+ exit(1);
+
+ rc = fcm_link_init(); /* NETLINK_ROUTE protocol */
+ if (rc != 0)
+ goto err_cleanup;
+
fcm_dcbd_init();
- fcm_srv_create(&srv_info);
+ rc = fcm_srv_create(&srv_info);
+ if (rc != 0)
+ goto err_cleanup;
+
+ if (!fcm_fg && daemon(0, !fcoe_config.use_syslog)) {
+ FCM_LOG("Starting daemon failed");
+ goto err_cleanup;
+ }
+
sa_select_set_callback(fcm_handle_changes);
rc = sa_select_loop();
if (rc < 0) {
FCM_LOG_ERR(rc, "select error\n");
- exit(EXIT_FAILURE);
+ goto err_cleanup;
}
fcm_dcbd_shutdown();
fcm_srv_destroy(&srv_info);
if (rc == SIGHUP)
fcm_cleanup();
return 0;
+
+err_cleanup:
+ fcm_cleanup();
+ exit(1);
}
/*******************************************************
--
2.1.0

View File

@ -1,83 +0,0 @@
From 91c0c8c0a37af40b3fb4a37df6490a226348d152 Mon Sep 17 00:00:00 2001
From: Vasu Dev <vasu.dev@intel.com>
Date: Fri, 5 Jun 2015 14:52:10 -0700
Subject: [PATCH] fcoemon: fix IEEE state machine
Fix IEEE state machine for these issues:-
- fcoeadm scan not working
- fcoeadm reset not working
- periodic fipvlan issuance even after fcoe instance created
These issues are due to current IEEE states are not correctly
handled. The validate_ieee_info() return either activate or
wait actions and out of that only activate is really used to
enable fcoe instance and none other action are applicable in
IEEE state machine, so reduced to only activate and then
advance the state machine to new IEEE_ACTIVE state to allow
processing of scan & reset command once interface activated.
This also fixes fipvlan issuance issue beside fixing scan and
reset fcoeadm commands.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-By: Jack Morgan<jack.morgan@intel.com>
---
fcoemon.c | 19 +++++++------------
fcoemon.h | 1 +
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/fcoemon.c b/fcoemon.c
index c5edd1b..c0af99b 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -1341,6 +1341,7 @@ STR_ARR(ieee_states, "Unknown", "Out of range",
[IEEE_INIT] = "IEEE_INIT",
[IEEE_GET_STATE] = "IEEE_GET_STATE",
[IEEE_DONE] = "IEEE_DONE",
+ [IEEE_ACTIVE] = "IEEE_ACTIVE",
);
static void
@@ -3054,20 +3055,14 @@ static void fcm_netif_ieee_advance(struct fcm_netif *ff)
break;
case IEEE_DONE:
action = validate_ieee_info(ff);
- switch (action) {
- case FCP_DESTROY_IF:
- case FCP_ENABLE_IF:
- case FCP_ACTIVATE_IF:
+ if (action == FCP_ACTIVATE_IF) {
fcp_action_set(ff->ifname, action);
- break;
- case FCP_DISABLE_IF:
- case FCP_ERROR:
- fcp_action_set(ff->ifname, FCP_DISABLE_IF);
- break;
- case FCP_WAIT:
- default:
- break;
+ ieee_state_set(ff, IEEE_ACTIVE);
}
+ break;
+ case IEEE_ACTIVE:
+ /* TBD enable and disable if needed in IEEE mode */
+ break;
default:
break;
}
diff --git a/fcoemon.h b/fcoemon.h
index c2ed7b1..3869bae 100644
--- a/fcoemon.h
+++ b/fcoemon.h
@@ -80,6 +80,7 @@ enum ieee_state {
IEEE_INIT = 0, /* Starting state */
IEEE_GET_STATE, /* Getting IEEE DCB state */
IEEE_DONE, /* Received IEEE DCB state */
+ IEEE_ACTIVE, /* IEEE is in ACTIVE state */
IEEE_ERROR, /* Error receiving IEEE DCB state */
};
--
2.1.0

View File

@ -1,26 +0,0 @@
From 8065e01707c3306380c684712e547fcf0e4e55da Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Thu, 5 Feb 2015 11:46:31 -0800
Subject: [PATCH] sanmac isn't required
Signed-off-by: Chris Leech <cleech@redhat.com>
---
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

View File

@ -1,29 +0,0 @@
From cc0037c0091a2b9baf04a5101ec83a6ec8db448b Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Mon, 6 Jul 2015 20:43:56 -0700
Subject: [PATCH] fcoeadm: fix display when some netdevs don't have serial
numbers
---
fcoeadm_display.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
index 9b96170..3b7fff9 100644
--- a/fcoeadm_display.c
+++ b/fcoeadm_display.c
@@ -1294,9 +1294,8 @@ enum fcoe_status display_adapter_info(const char *ifname)
continue;
}
- if (!strncmp(hba_attrs->SerialNumber,
- shba_attrs->SerialNumber,
- strlen(hba_attrs->SerialNumber))) {
+ if (!strcmp(hba_attrs->SerialNumber,
+ shba_attrs->SerialNumber)) {
show_port_info(sport_attrs);
hba_table_list->hba_table[j].displayed = 1;
}
--
2.1.0

View File

@ -1,34 +1,29 @@
# https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
%global _hardened_build 1
%global checkout 91c0c8c
%global checkout f5cbb9a
Name: fcoe-utils
Version: 1.0.30
Release: 5.git%{checkout}%{?dist}
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: %{name}-%{version}.tar.gz
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
ExcludeArch: ppc s390
Patch1: fcoe-utils-v1.0.30-1-fcoemon-Rework-daemonizing-and-error-handling.patch
Patch2: fcoe-utils-v1.0.30-2-fcoemon-fix-IEEE-state-machine.patch
Patch3: fcoe-utils-v1.0.30-3-sanmac-isn-t-required.patch
Patch4: fcoe-utils-v1.0.30-fcoeadm-fix-display-when-some-netdevs-don-t-have-ser.patch
Patch0: fcoe-utils-ggc7-fmt-truc-err.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libhbaapi-devel >= 2.2.9-6
BuildRequires: libhbalinux-devel >= 1.0.17-1
BuildRequires: libpciaccess-devel
BuildRequires: libtool
BuildRequires: lldpad-devel >= 0.9.43
BuildRequires: systemd
Requires: lldpad >= 0.9.43
Requires: libhbalinux >= 1.0.16-5
Requires: iproute
Requires: device-mapper-multipath
Requires(post): systemd
@ -86,6 +81,9 @@ rm -f %{buildroot}/%{_sysconfdir}/fcoe/config
%{_libexecdir}/fcoe/
%changelog
* Thu Feb 09 2017 Chris Leech <cleech@redhat.com> - 1.0.32-1
- update to 1.0.32
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.30-5.git91c0c8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1 +1 @@
6fcbb0e06a2af0bc1f2f5453d1042eaf fcoe-utils-1.0.30.tar.gz
SHA512 (fcoe-utils-1.0.32.tar.gz) = 45b4ba5618f6d7a99ac206a158b4abd38201f0b29c46601a9f70425ae2610fb2688db5b276ef835699e71eeba1db65cc88e76e45cbc645d5f846ef6032a08874