Hello community, here is the log from the commit of package fcoe-utils for openSUSE:Factory checked in at 2017-02-14 00:36:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fcoe-utils (Old) and /work/SRC/openSUSE:Factory/.fcoe-utils.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fcoe-utils" Changes: -------- --- /work/SRC/openSUSE:Factory/fcoe-utils/fcoe-utils.changes 2016-07-21 07:52:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.fcoe-utils.new/fcoe-utils.changes 2017-02-14 00:36:43.037205826 +0100 @@ -1,0 +2,10 @@ +Thu Feb 9 08:54:54 UTC 2017 - [email protected] + +- Update to latest upstream release (FATE#320515) + Remove the following upstreamed patches: + 0007-fipvlan-clean-up-state-machine-for-pfd_add.patch + 0009-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch + 0010-fcoemon-fixup-log_nlmsg_error.patch + 0011-fcoemon-Add-debugging-message-for-recv.patch + 0013-Fallback-to-default-MAC-address-for-FIP.patch +------------------------------------------------------------------- Old: ---- 0007-fipvlan-clean-up-state-machine-for-pfd_add.patch 0009-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch 0010-fcoemon-fixup-log_nlmsg_error.patch 0011-fcoemon-Add-debugging-message-for-recv.patch 0013-Fallback-to-default-MAC-address-for-FIP.patch fcoe-utils-1.0.31.tar.xz New: ---- _service fcoe-utils-1.0.32.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fcoe-utils.spec ++++++ --- /var/tmp/diff_new_pack.IMvtBg/_old 2017-02-14 00:36:44.181044336 +0100 +++ /var/tmp/diff_new_pack.IMvtBg/_new 2017-02-14 00:36:44.185043771 +0100 @@ -1,7 +1,7 @@ # # spec file for package fcoe-utils # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,7 +29,7 @@ Requires: iproute Requires: open-lldp %systemd_requires -Version: 1.0.31 +Version: 1.0.32 Release: 0 Summary: FCoE userspace management tools License: GPL-2.0 @@ -42,13 +42,8 @@ Patch4: 0004-fcoemon-Correctly-handle-options-in-the-service-file.patch Patch5: 0005-fcoe.service-Add-foreground-to-prevent-fcoemon-to-be.patch Patch6: 0006-fipvlan-fixup-return-value-on-error.patch -Patch7: 0007-fipvlan-clean-up-state-machine-for-pfd_add.patch Patch8: 0008-Use-correct-socket-for-fcoemon.socket.patch -Patch9: 0009-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch -Patch10: 0010-fcoemon-fixup-log_nlmsg_error.patch -Patch11: 0011-fcoemon-Add-debugging-message-for-recv.patch Patch12: 0012-fcoemon-Retry-fcm_link_getlink-on-EBUSY.patch -Patch13: 0013-Fallback-to-default-MAC-address-for-FIP.patch # Patches from Fedora Patch101: fcoe-utils-1.0.29-make.patch @@ -65,13 +60,8 @@ %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 %patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 %patch12 -p1 -%patch13 -p1 %patch101 -p1 %build ++++++ _service ++++++ <services> <service name="tar_scm" mode="disabled"> <param name="url">https://github.com/morbidrsa/fcoe-utils.git</param> <param name="scm">git</param> <param name="filename">fcoe-utils</param> <param name="versionformat">1.0.32</param> <param name="revision">v1.0.32</param> <param name="exclude">.git</param> </service> <service name="recompress" mode="disabled"> <param name="file">*.tar</param> <param name="compression">xz</param> </service> <service name="set_version" mode="disabled"> <param name="basename">fcoe-utils</param> </service> </services> ++++++ fcoe-utils-1.0.31.tar.xz -> fcoe-utils-1.0.32.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcoe-utils-1.0.31/.gitignore new/fcoe-utils-1.0.32/.gitignore --- old/fcoe-utils-1.0.31/.gitignore 2016-02-05 20:53:34.000000000 +0100 +++ new/fcoe-utils-1.0.32/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,32 +0,0 @@ -# standard autotools stuff -.deps/ -Makefile -Makefile.in -aclocal.m4 -autom4te.cache/ -compile -config.log -config.status -configure -depcomp -install-sh -missing - -# other autoconf generated files -fcoe-utils.spec -fcoeplumb -fcoe_utils_version.h - -# compile generated files -*.o -fcoeadm -fcoemon -fipvlan -fcping -fcnsq -fcrls -etc/initd/fcoe - -# build.sh generated files -fcoe-utils-*.tar.gz -fcoe-utils-*.rpm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcoe-utils-1.0.31/configure.ac new/fcoe-utils-1.0.32/configure.ac --- old/fcoe-utils-1.0.31/configure.ac 2016-02-05 20:53:34.000000000 +0100 +++ new/fcoe-utils-1.0.32/configure.ac 2017-01-17 13:19:20.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT([fcoe-utils], [1.0.31], [[email protected]]) +AC_INIT([fcoe-utils], [1.0.32], [[email protected]]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AM_INIT_AUTOMAKE([foreign]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcoe-utils-1.0.31/fcoeadm_display.c new/fcoe-utils-1.0.32/fcoeadm_display.c --- old/fcoe-utils-1.0.31/fcoeadm_display.c 2016-02-05 20:53:34.000000000 +0100 +++ new/fcoe-utils-1.0.32/fcoeadm_display.c 2017-01-17 13:19:20.000000000 +0100 @@ -132,7 +132,7 @@ printf(" Port Name: %s\n", lp_info->port_name); - printf(" FabricName: %s\n", + printf(" Fabric Name: %s\n", lp_info->fabric_name); printf(" Speed: %s\n", @@ -267,13 +267,13 @@ 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 @@ 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) @@ -660,17 +660,19 @@ 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 @@ } else { ifname = get_ifname_from_rport(rport); if (!ifname) - return -ENOMEM; + return 0; allocated = true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcoe-utils-1.0.31/fcoemon.c new/fcoe-utils-1.0.32/fcoemon.c --- old/fcoe-utils-1.0.31/fcoemon.c 2016-02-05 20:53:34.000000000 +0100 +++ new/fcoe-utils-1.0.32/fcoemon.c 2017-01-17 13:19:20.000000000 +0100 @@ -557,6 +557,9 @@ 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); @@ -752,7 +755,7 @@ struct nlmsgerr *ep; if (NLMSG_OK(hp, rlen)) { - ep = (struct nlmsgerr *)NLMSG_NEXT(hp, rlen); + ep = (struct nlmsgerr *)NLMSG_DATA(hp); FCM_LOG_DBG("%s, err=%d, type=%d\n", str, ep->error, ep->msg.nlmsg_type); } else { @@ -1052,7 +1055,7 @@ int fd; int origdev = 1; - fd = fip_socket(p->ifindex, FIP_NONE); + fd = fip_socket(p->ifindex, p->mac, FIP_NONE); if (fd < 0) { FCM_LOG_ERR(errno, "socket error"); return fd; @@ -1491,7 +1494,7 @@ if (p->fip_responder_socket >= 0) return; - s = fip_socket(p->ifindex, FIP_ALL_VN2VN); + s = fip_socket(p->ifindex, p->mac, FIP_ALL_VN2VN); if (s < 0) { FCM_LOG_ERR(errno, "%s: Failed to get fip socket\n", p->ifname); return; @@ -2201,6 +2204,7 @@ len = strlen(buf); ASSERT(len <= rc); + FCM_LOG_DBG("recv '%s', len=%d bytes succeeded", buf, (int)len); switch (buf[CLIF_RSP_MSG_OFF]) { case CMD_RESPONSE: st = fcm_get_hex(buf + CLIF_STAT_OFF, CLIF_STAT_LEN, @@ -2902,10 +2906,22 @@ void fcm_vlan_disc_timeout(void *arg) { struct fcoe_port *p = arg; + int s; + FCM_LOG_DBG("%s: VLAN discovery TIMEOUT [%d]", p->ifname, p->vlan_disc_count); p->vlan_disc_count++; + if (p->fip_socket < 0) { + s = fcm_vlan_disc_socket(p); + if (s < 0) { + FCM_LOG_ERR(errno, "Could not acquire fip socket.\n"); + goto set_timeout; + } + p->fip_socket = s; + p->vlan_disc_count = 1; + } fcm_send_fip_request(p); +set_timeout: sa_timer_set(&p->vlan_disc_timer, FCM_VLAN_DISC_TIMEOUT); } @@ -2914,8 +2930,16 @@ int s; if (p->fip_socket < 0) { s = fcm_vlan_disc_socket(p); - if (s < 0) + if (s < 0) { + /* + * If we can't open the socket set the timeout + * anyways so we will retry sending the fipvlan + * request. + */ + FCM_LOG_ERR(errno, "Failed to open socket, setting VLAN DISC timer.\n"); + sa_timer_set(&p->vlan_disc_timer, FCM_VLAN_DISC_TIMEOUT); return s; + } p->fip_socket = s; } p->vlan_disc_count = 1; @@ -3768,7 +3792,9 @@ 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcoe-utils-1.0.31/fcoemon.h new/fcoe-utils-1.0.32/fcoemon.h --- old/fcoe-utils-1.0.31/fcoemon.h 2016-02-05 20:53:34.000000000 +0100 +++ new/fcoe-utils-1.0.32/fcoemon.h 2017-01-17 13:19:20.000000000 +0100 @@ -25,6 +25,7 @@ struct fcoe_config { int debug; int use_syslog; + int dcb_init; struct fcoe_port *port; } fcoe_config; @@ -67,7 +68,7 @@ FCD_GET_PFC_CONFIG, /* getting PFC configuration */ FCD_GET_APP_CONFIG, /* getting APP configuration */ FCD_GET_PFC_OPER, /* getting PFC operational mode */ - FCD_GET_APP_OPER, /* getting operational mode */ + FCD_GET_APP_OPER, /* getting AAP operational mode */ FCD_GET_PEER, /* getting peer configuration */ FCD_DONE, /* DCB exchanges complete */ FCD_ERROR, /* DCB error or port unknown by DCB */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcoe-utils-1.0.31/fcping.c new/fcoe-utils-1.0.32/fcping.c --- old/fcoe-utils-1.0.31/fcping.c 2016-02-05 20:53:34.000000000 +0100 +++ new/fcoe-utils-1.0.32/fcping.c 2017-01-17 13:19:20.000000000 +0100 @@ -98,7 +98,7 @@ cmdname, FP_LEN_MAX); fprintf(stderr, "\nNote that the default maximum FC payload allowed " - "is %lu bytes and the default maxmaxium fcping payload, " + "is %lu bytes and the default maximum fcping payload, " "i.e., the FC ELS ECHO data, allowed is %lu " "bytes.\n", FC_MAX_PAYLOAD, FP_LEN_MAX); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcoe-utils-1.0.31/fipvlan.c new/fcoe-utils-1.0.32/fipvlan.c --- old/fcoe-utils-1.0.31/fipvlan.c 2016-02-05 20:53:34.000000000 +0100 +++ new/fcoe-utils-1.0.32/fipvlan.c 2017-01-17 13:19:20.000000000 +0100 @@ -124,6 +124,8 @@ npfd = realloc(pfd, pfd_len * sizeof(struct pollfd)); if (npfd) pfd = npfd; + else + perror("realloc failed"); } TAILQ_HEAD(iff_list_head, iff); @@ -815,7 +817,7 @@ return 0; if (!iff->fip_ready) { - iff->ps = fip_socket(iff->ifindex, FIP_NONE); + iff->ps = fip_socket(iff->ifindex, iff->mac_addr, FIP_NONE); if (iff->ps < 0) { FIP_LOG_DBG("if %d not ready\n", iff->ifindex); return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcoe-utils-1.0.31/include/fip.h new/fcoe-utils-1.0.32/include/fip.h --- old/fcoe-utils-1.0.31/include/fip.h 2016-02-05 20:53:34.000000000 +0100 +++ new/fcoe-utils-1.0.32/include/fip.h 2017-01-17 13:19:20.000000000 +0100 @@ -144,7 +144,7 @@ /* libutil / fip.c functionality */ -int fip_socket(int ifindex, enum fip_multi multi); +int fip_socket(int ifindex, unsigned char *mac, enum fip_multi multi); /* FIP message handler, passed into fip_recv */ typedef int fip_handler(struct fiphdr *fh, struct sockaddr_ll *sa, void *arg); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcoe-utils-1.0.31/lib/fip.c new/fcoe-utils-1.0.32/lib/fip.c --- old/fcoe-utils-1.0.31/lib/fip.c 2016-02-05 20:53:34.000000000 +0100 +++ new/fcoe-utils-1.0.32/lib/fip.c 2017-01-17 13:19:20.000000000 +0100 @@ -122,13 +122,13 @@ * @ifindex: network interface index to send on * @add: 1 to add 0 to del */ -static int fip_socket_sanmac(int s, int ifindex, int add) +static int fip_socket_sanmac(int s, int ifindex, unsigned char *mac, int add) { unsigned char smac[ETHER_ADDR_LEN]; if (fip_get_sanmac(ifindex, smac)) { FIP_LOG_DBG("%s: no sanmac, ifindex %d\n", __func__, ifindex); - return -ENXIO; + memcpy(smac, mac, ETHER_ADDR_LEN); } return fip_socket_add_addr(s, ifindex, add, smac, false); @@ -200,7 +200,7 @@ * @ifindex: ifindex of netdevice to bind to * @multi: Indication of any multicast address to bind to */ -int fip_socket(int ifindex, enum fip_multi multi) +int fip_socket(int ifindex, unsigned char *mac, enum fip_multi multi) { struct sockaddr_ll sa = { .sll_family = AF_PACKET, @@ -211,11 +211,14 @@ int rc; s = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_FIP)); - if (s < 0) + if (s < 0) { + FIP_LOG_ERR(errno, "Failed to open FIP socket.\n"); return s; + } - rc = fip_socket_sanmac(s, ifindex, 1); - if (rc < 0) { + rc = fip_socket_sanmac(s, ifindex, mac, 1); + if (rc < 0 && rc != -ENXIO) { + FIP_LOG_ERR(errno, "Failed to open SANMAC socket.\n"); close(s); return rc; } @@ -224,6 +227,7 @@ rc = bind(s, (struct sockaddr *) &sa, sizeof(sa)); if (rc < 0) { + FIP_LOG_ERR(errno, "Bind failed.\n"); close(s); return rc; }
