From f0b91cecfdd14672dd18fd83bca2cec22f18d697e7ed276bd375e8682fa05ac7 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Tue, 19 Mar 2019 13:17:41 +0000 Subject: [PATCH] Accepting request 686339 from home:marxin:branches:network:fcoe - Add gcc9-fix-werror.patch in order to fix bsc#1128299. - Adjust project URL as we're using the Intel's fork. OBS-URL: https://build.opensuse.org/request/show/686339 OBS-URL: https://build.opensuse.org/package/show/network:fcoe/open-lldp?expand=0&rev=28 --- gcc9-fix-werror.patch | 23 +++++++++++++++++++++++ open-lldp.changes | 6 ++++++ open-lldp.spec | 8 +++++--- 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 gcc9-fix-werror.patch diff --git a/gcc9-fix-werror.patch b/gcc9-fix-werror.patch new file mode 100644 index 0000000..385983b --- /dev/null +++ b/gcc9-fix-werror.patch @@ -0,0 +1,23 @@ +From cf1da68e3103022f93680208de24304726276936 Mon Sep 17 00:00:00 2001 +From: marxin +Date: Thu, 7 Mar 2019 10:33:29 +0100 +Subject: [PATCH] Fix #23 by off by one strncpy value. + +--- + lldp_dcbx_nl.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lldp_dcbx_nl.c b/lldp_dcbx_nl.c +index 7a2dad2..357da9c 100644 +--- a/lldp_dcbx_nl.c ++++ b/lldp_dcbx_nl.c +@@ -561,7 +561,8 @@ int get_dcb_numtcs(const char *ifname, u8 *pgtcs, u8 *pfctcs) + + seq = nlh->nlmsg_seq; + +- strncpy(name, ifname, sizeof(name)); ++ strncpy(name, ifname, sizeof(name) - 1); ++ name[sizeof(name) - 1] = '\0'; + add_rta(nlh, DCB_ATTR_IFNAME, (void *)name, strlen(name) + 1); + rta_parent = add_rta(nlh, DCB_ATTR_NUMTCS, NULL, 0); + diff --git a/open-lldp.changes b/open-lldp.changes index 541fa98..6c191af 100644 --- a/open-lldp.changes +++ b/open-lldp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 19 09:43:38 UTC 2019 - Martin Liška + +- Add gcc9-fix-werror.patch in order to fix bsc#1128299. +- Adjust project URL as we're using the Intel's fork. + ------------------------------------------------------------------- Thu Jan 10 16:32:32 CET 2019 - hare@suse.de diff --git a/open-lldp.spec b/open-lldp.spec index 7ffb65c..d7ecfe8 100644 --- a/open-lldp.spec +++ b/open-lldp.spec @@ -12,14 +12,14 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define libname liblldp_clif1 Name: open-lldp Summary: Link Layer Discovery Protocol (LLDP) Agent -License: GPL-2.0 +License: GPL-2.0-only Group: System/Daemons Version: 1.0.1+56.cb81e95 Release: 0 @@ -30,8 +30,9 @@ BuildRequires: libnl3-devel BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: readline-devel -Url: http://open-lldp.org/ +Url: https://github.com/intel/openlldp Source: %{name}-v%{version}.tar.xz +Patch0: gcc9-fix-werror.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: dcbd = %{version} Obsoletes: dcbd < %{version} @@ -69,6 +70,7 @@ with Data Center Bridging (DCB) for Intel(R) Network Connections %prep %setup -n %{name}-v%{version} +%patch0 -p1 %build autoreconf -vi