Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lldpd for openSUSE:Factory checked in at 2021-05-03 22:08:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lldpd (Old) and /work/SRC/openSUSE:Factory/.lldpd.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lldpd" Mon May 3 22:08:15 2021 rev:17 rq:889937 version:1.0.11 Changes: -------- --- /work/SRC/openSUSE:Factory/lldpd/lldpd.changes 2021-04-12 17:10:53.630600129 +0200 +++ /work/SRC/openSUSE:Factory/.lldpd.new.2988/lldpd.changes 2021-05-03 22:08:39.056368040 +0200 @@ -1,0 +2,9 @@ +Sun May 2 14:46:38 UTC 2021 - Martin Hauke <mar...@gmx.de> + +- Update to version 1.0.11: + * Changes: + + Disable LLDP in firmware for Intel X7xx cards. + * Fix: + + Ensure Intel E8xx cards can transmit LLDP packets. + +------------------------------------------------------------------- Old: ---- lldpd-1.0.10.tar.gz lldpd-1.0.10.tar.gz.asc New: ---- lldpd-1.0.11.tar.gz lldpd-1.0.11.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lldpd.spec ++++++ --- /var/tmp/diff_new_pack.TrPvfQ/_old 2021-05-03 22:08:39.552365924 +0200 +++ /var/tmp/diff_new_pack.TrPvfQ/_new 2021-05-03 22:08:39.552365924 +0200 @@ -26,7 +26,7 @@ %define _fillupdir %{_localstatedir}/adm/fillup-templates %endif Name: lldpd -Version: 1.0.10 +Version: 1.0.11 Release: 0 Summary: Implementation of IEEE 802.1ab (LLDP) # We have some GPL linux headers in include/linux, they are used on ++++++ lldpd-1.0.10.tar.gz -> lldpd-1.0.11.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/.dist-version new/lldpd-1.0.11/.dist-version --- old/lldpd-1.0.10/.dist-version 2021-04-09 12:54:04.000000000 +0200 +++ new/lldpd-1.0.11/.dist-version 2021-05-01 18:56:02.000000000 +0200 @@ -1 +1 @@ -1.0.10 +1.0.11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/ChangeLog new/lldpd-1.0.11/ChangeLog --- old/lldpd-1.0.10/ChangeLog 2021-04-09 12:54:03.000000000 +0200 +++ new/lldpd-1.0.11/ChangeLog 2021-05-01 18:56:01.000000000 +0200 @@ -1,3 +1,14 @@ +1.0.11 [2021-05-01 18:52:30 +0200]: + + - [1b297ccc0956] release: 1.0.11 (Vincent Bernat) + - [3765d7ff8554] priv: explain why we don't use ethtool (Vincent Bernat) + - [a74fd8ca9c02] priv: disable LLDP in firmware for Intel X7xx cards (Vincent Bernat) + - [ad6d5d831e6c] priv: ensure Intel E8xx cards can transmit LLDP packets (Vincent Bernat) + - [fe4273974c10] daemon: fix some use of "if defined" (Vincent Bernat) + - [3020ec35c0a2] github: no need to be smart to show how to format code (Vincent Bernat) + - [30b2f5f7bf20] github: explain people how to format lines of code (Vincent Bernat) + - [b85fd128986a] osx: update Homebrew recipe (Vincent Bernat) + 1.0.10 [2021-04-09 12:52:15 +0200]: - [7749b008183f] release: 1.0.10 (Vincent Bernat) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/NEWS new/lldpd-1.0.11/NEWS --- old/lldpd-1.0.10/NEWS 2021-04-09 11:51:16.000000000 +0200 +++ new/lldpd-1.0.11/NEWS 2021-04-27 22:57:48.000000000 +0200 @@ -1,3 +1,9 @@ +lldpd (1.0.11) + * Changes: + + Disable LLDP in firmware for Intel X7xx cards. + * Fix: + + Ensure Intel E8xx cards can transmit LLDP packets. + lldpd (1.0.10) * Fix: + Fix chroot directory creation. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/README.md new/lldpd-1.0.11/README.md --- old/lldpd-1.0.10/README.md 2021-01-28 12:54:14.000000000 +0100 +++ new/lldpd-1.0.11/README.md 2021-04-27 22:40:58.000000000 +0200 @@ -320,14 +320,6 @@ tcpdump -s0 -vv -pni eth0 ether dst 01:80:c2:00:00:0e -Intel X710 cards may handle LLDP themselves, intercepting any incoming -packets. If you don't see anything through `tcpdump`, check if you -have such a card (with `lspci`) and stop the embedded LLDP daemon: - - for f in /sys/kernel/debug/i40e/*/command; do - echo lldp stop > $f - done - License ------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/configure new/lldpd-1.0.11/configure --- old/lldpd-1.0.10/configure 2021-04-09 12:52:45.000000000 +0200 +++ new/lldpd-1.0.11/configure 2021-05-01 18:55:46.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for lldpd 1.0.10. +# Generated by GNU Autoconf 2.69 for lldpd 1.0.11. # # Report bugs to <https://github.com/lldpd/lldpd/issues>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='lldpd' PACKAGE_TARNAME='lldpd' -PACKAGE_VERSION='1.0.10' -PACKAGE_STRING='lldpd 1.0.10' +PACKAGE_VERSION='1.0.11' +PACKAGE_STRING='lldpd 1.0.11' PACKAGE_BUGREPORT='https://github.com/lldpd/lldpd/issues' PACKAGE_URL='https://lldpd.github.io/' @@ -1517,7 +1517,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures lldpd 1.0.10 to adapt to many kinds of systems. +\`configure' configures lldpd 1.0.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1588,7 +1588,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of lldpd 1.0.10:";; + short | recursive ) echo "Configuration of lldpd 1.0.11:";; esac cat <<\_ACEOF @@ -1805,7 +1805,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -lldpd configure 1.0.10 +lldpd configure 1.0.11 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2285,7 +2285,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by lldpd $as_me 1.0.10, which was +It was created by lldpd $as_me 1.0.11, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3154,7 +3154,7 @@ # Define the identity of the package. PACKAGE='lldpd' - VERSION='1.0.10' + VERSION='1.0.11' cat >>confdefs.h <<_ACEOF @@ -23076,7 +23076,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by lldpd $as_me 1.0.10, which was +This file was extended by lldpd $as_me 1.0.11, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23143,7 +23143,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -lldpd config.status 1.0.10 +lldpd config.status 1.0.11 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/libevent/Makefile.in new/lldpd-1.0.11/libevent/Makefile.in --- old/lldpd-1.0.10/libevent/Makefile.in 2021-04-09 12:52:40.000000000 +0200 +++ new/lldpd-1.0.11/libevent/Makefile.in 2021-05-01 18:55:42.000000000 +0200 @@ -2844,8 +2844,8 @@ @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) @ENABLE_DOXYGEN_FALSE@install-data-local: -@ENABLE_DOXYGEN_FALSE@clean-local: @ENABLE_DOXYGEN_FALSE@uninstall-local: +@ENABLE_DOXYGEN_FALSE@clean-local: clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/src/daemon/interfaces-bsd.c new/lldpd-1.0.11/src/daemon/interfaces-bsd.c --- old/lldpd-1.0.10/src/daemon/interfaces-bsd.c 2020-11-14 11:21:53.000000000 +0100 +++ new/lldpd-1.0.11/src/daemon/interfaces-bsd.c 2021-04-25 19:09:57.000000000 +0200 @@ -78,7 +78,7 @@ .ifbic_req = req }; -#if defined HOST_OS_FREEBSD || defined HOST_OS_NETBSD || defined HOST_OS_OSX || HOST_OS_DRAGONFLY +#if defined HOST_OS_FREEBSD || defined HOST_OS_NETBSD || defined HOST_OS_OSX || defined HOST_OS_DRAGONFLY struct ifdrv ifd = { .ifd_cmd = BRDGGIFS, .ifd_len = sizeof(bifc), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/src/daemon/lldpd.h new/lldpd-1.0.11/src/daemon/lldpd.h --- old/lldpd-1.0.10/src/daemon/lldpd.h 2021-03-21 13:35:36.000000000 +0100 +++ new/lldpd-1.0.11/src/daemon/lldpd.h 2021-04-25 19:09:57.000000000 +0200 @@ -38,7 +38,7 @@ #include <sys/un.h> #include "lldp-tlv.h" -#if defined (ENABLE_CDP) || defined (ENABLE_FDP) +#if defined ENABLE_CDP || defined ENABLE_FDP # include "protocols/cdp.h" #endif #ifdef ENABLE_SONMP @@ -142,7 +142,7 @@ int cdpv1_guess(PROTO_GUESS_SIG); int cdpv2_guess(PROTO_GUESS_SIG); #endif -#if defined (ENABLE_CDP) || defined (ENABLE_FDP) +#if defined ENABLE_CDP || defined ENABLE_FDP int cdp_decode(PROTO_DECODE_SIG); #endif #ifdef ENABLE_FDP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/src/daemon/lldpd.service.in new/lldpd-1.0.11/src/daemon/lldpd.service.in --- old/lldpd-1.0.10/src/daemon/lldpd.service.in 2020-04-30 20:11:42.000000000 +0200 +++ new/lldpd-1.0.11/src/daemon/lldpd.service.in 2021-04-27 23:20:11.000000000 +0200 @@ -13,7 +13,7 @@ Restart=on-failure PrivateTmp=yes ProtectHome=yes -ProtectKernelTunables=yes +ProtectKernelTunables=no ProtectControlGroups=yes ProtectKernelModules=yes #ProtectSystem=full diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/src/daemon/priv-linux.c new/lldpd-1.0.11/src/daemon/priv-linux.c --- old/lldpd-1.0.10/src/daemon/priv-linux.c 2021-03-21 13:35:43.000000000 +0100 +++ new/lldpd-1.0.11/src/daemon/priv-linux.c 2021-05-01 15:42:03.000000000 +0200 @@ -34,10 +34,16 @@ #include <linux/filter.h> /* For BPF filtering */ #include <linux/sockios.h> #include <linux/if_ether.h> +#include <linux/ethtool.h> #if defined(__clang__) #pragma clang diagnostic pop #endif +/* Defined in linux/pkt_sched.h */ +#define TC_PRIO_CONTROL 7 +/* Defined in sysfs/libsysfs.h */ +#define SYSFS_PATH_MAX 256 + /* Proxy for open */ int priv_open(char *file) @@ -118,6 +124,81 @@ close(fd); } +/* Quirks needed by some additional interfaces. Currently, this is limited to + * disabling LLDP firmware for i40e. */ +static void +asroot_iface_init_quirks(int ifindex, char *name) +{ + int s = -1; + int fd = -1; + + /* Check driver. */ + struct ethtool_drvinfo ethc = { + .cmd = ETHTOOL_GDRVINFO + }; + struct ifreq ifr = { + .ifr_data = (caddr_t)ðc + }; + if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { + log_warn("privsep", "unable to open a socket"); + goto end; + } + strlcpy(ifr.ifr_name, name, IFNAMSIZ); + if (ioctl(s, SIOCETHTOOL, &ifr) != 0 || + strncmp("i40e", ethc.driver, sizeof(ethc.driver))) { + /* Not i40e */ + goto end; + } + log_info("interfaces", + "i40e driver detected for %s, disabling LLDP in firmware", + name); + + /* We assume debugfs is mounted. Otherwise, we would need to check if it + * is mounted, then unshare a new mount namespace, mount it, issues the + * command, leave the namespace. Let's see if there is such a need. */ + + /* Alternative is to use ethtool (ethtool --set-priv-flags ens5f0 + * disable-fw-lldp on). However, this requires a recent firmware (from + * i40e_ethtool.c): + * + * If the driver detected FW LLDP was disabled on init, this flag could + * be set, however we do not support _changing_ the flag: + * - on XL710 if NPAR is enabled or FW API version < 1.7 + * - on X722 with FW API version < 1.6 + */ + + char command[] = "lldp stop"; + char sysfs_path[SYSFS_PATH_MAX+1]; + if (snprintf(sysfs_path, SYSFS_PATH_MAX, + "/sys/kernel/debug/i40e/%.*s/command", + (int)sizeof(ethc.bus_info), ethc.bus_info) >= SYSFS_PATH_MAX) { + log_warnx("interfaces", "path truncated"); + goto end; + } + if ((fd = open(sysfs_path, O_WRONLY)) == -1) { + if (errno == ENOENT) { + log_info("interfaces", + "%s does not exist, " + "cannot disable LLDP in firmware for %s", + sysfs_path, name); + goto end; + } + log_warn("interfaces", + "cannot open %s to disable LLDP in firmware for %s", + sysfs_path, name); + goto end; + } + if (write(fd, command, sizeof(command) - 1) == -1) { + log_warn("interfaces", + "cannot disable LLDP in firmware for %s", + name); + goto end; + } +end: + if (s != -1) close(s); + if (fd != -1) close(fd); +} + int asroot_iface_init_os(int ifindex, char *name, int *fd) { @@ -155,6 +236,16 @@ return rc; } + /* Set priority to TC_PRIO_CONTROL for ice Intel cards. See #444. */ + int prio = TC_PRIO_CONTROL; + if (setsockopt(*fd, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio)) < 0) { + rc = errno; + log_warn("privsep", + "unable to set priority \"control\" to socket for interface %s", + name); + return rc; + } + #ifdef SO_LOCK_FILTER int lock = 1; if (setsockopt(*fd, SOL_SOCKET, SO_LOCK_FILTER, @@ -180,6 +271,7 @@ } #endif + asroot_iface_init_quirks(ifindex, name); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/src/daemon/priv.c new/lldpd-1.0.11/src/daemon/priv.c --- old/lldpd-1.0.10/src/daemon/priv.c 2021-04-09 11:58:48.000000000 +0200 +++ new/lldpd-1.0.11/src/daemon/priv.c 2021-04-25 21:43:31.000000000 +0200 @@ -43,7 +43,7 @@ #include <sys/prctl.h> #endif -#if defined HOST_OS_FREEBSD || HOST_OS_OSX || HOST_OS_DRAGONFLY +#if defined HOST_OS_FREEBSD || defined HOST_OS_OSX || defined HOST_OS_DRAGONFLY # include <net/if_dl.h> #endif #if defined HOST_OS_SOLARIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/src/daemon/protocols/cdp.c new/lldpd-1.0.11/src/daemon/protocols/cdp.c --- old/lldpd-1.0.10/src/daemon/protocols/cdp.c 2021-03-16 17:31:48.000000000 +0100 +++ new/lldpd-1.0.11/src/daemon/protocols/cdp.c 2021-04-25 19:09:57.000000000 +0200 @@ -30,7 +30,7 @@ #define CDP_SWITCH_POE_CLASS_4_OFFSET 45 /* 4.5W max loss from cable */ #define CDP_SWITCH_POE_CLASS_3_OFFSET 24 /* 2.4W max loss from cable */ -#if defined (ENABLE_CDP) || defined (ENABLE_FDP) +#if defined ENABLE_CDP || defined ENABLE_FDP #include <stdio.h> #include <unistd.h> @@ -256,7 +256,7 @@ POKE_END_CDP_TLV)) goto toobig; } -#elif defined(ENABLE_LLDPMED) +#elif defined ENABLE_LLDPMED /* Power use */ if ((version >= 2) && port->p_med_cap_enabled && diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lldpd-1.0.10/src/lldpd-structs.h new/lldpd-1.0.11/src/lldpd-structs.h --- old/lldpd-1.0.10/src/lldpd-structs.h 2020-09-05 13:46:28.000000000 +0200 +++ new/lldpd-1.0.11/src/lldpd-structs.h 2021-04-25 19:09:57.000000000 +0200 @@ -145,7 +145,7 @@ MARSHAL(lldpd_dot3_power); #endif -#if defined (ENABLE_CDP) || defined (ENABLE_FDP) +#if defined ENABLE_CDP || defined ENABLE_FDP struct cdpv2_power { u_int16_t request_id; u_int16_t management_id; @@ -291,7 +291,7 @@ struct lldpd_med_power p_med_power; #endif -#if defined (ENABLE_CDP) || defined (ENABLE_FDP) +#if defined ENABLE_CDP || defined ENABLE_FDP struct cdpv2_power p_cdp_power; #endif