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-11-17 01:13:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lldpd (Old) and /work/SRC/openSUSE:Factory/.lldpd.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lldpd" Wed Nov 17 01:13:38 2021 rev:21 rq:931504 version:1.0.13 Changes: -------- --- /work/SRC/openSUSE:Factory/lldpd/lldpd.changes 2021-10-15 23:05:07.134146883 +0200 +++ /work/SRC/openSUSE:Factory/.lldpd.new.1890/lldpd.changes 2021-11-17 01:14:34.598179364 +0100 @@ -1,0 +2,8 @@ +Sun Nov 14 12:44:04 UTC 2021 - Martin Hauke <mar...@gmx.de> + +- Update to versino 1.0.13 + * Add support for 2.5G, 5G, 25G and 50G based Ethernet. + * Fix LLDP packets encapsuled in VLAN 0 in some conditions. + * Fix heap overflow when reading SONMP. CVE-2021-43612. + +------------------------------------------------------------------- Old: ---- lldpd-1.0.12.tar.gz lldpd-1.0.12.tar.gz.asc New: ---- lldpd-1.0.13.tar.gz lldpd-1.0.13.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lldpd.spec ++++++ --- /var/tmp/diff_new_pack.Mo07IG/_old 2021-11-17 01:14:35.510179707 +0100 +++ /var/tmp/diff_new_pack.Mo07IG/_new 2021-11-17 01:14:35.514179708 +0100 @@ -26,7 +26,7 @@ %define _fillupdir %{_localstatedir}/adm/fillup-templates %endif Name: lldpd -Version: 1.0.12 +Version: 1.0.13 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.12.tar.gz -> lldpd-1.0.13.tar.gz ++++++ ++++ 35269 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/.dist-version new/lldpd-1.0.13/.dist-version --- old/lldpd-1.0.12/.dist-version 2021-08-20 22:27:55.000000000 +0200 +++ new/lldpd-1.0.13/.dist-version 2021-11-13 13:38:06.000000000 +0100 @@ -1 +1 @@ -1.0.12 +1.0.13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/ChangeLog new/lldpd-1.0.13/ChangeLog --- old/lldpd-1.0.12/ChangeLog 2021-08-20 22:27:54.000000000 +0200 +++ new/lldpd-1.0.13/ChangeLog 2021-11-13 13:38:06.000000000 +0100 @@ -1,3 +1,31 @@ +1.0.13 [2021-11-13 13:05:00 +0100]: + + - [9576b78ec445] release: 1.0.13 (Vincent Bernat) + - [3a66eef6c078] tests: stop complain about extra args when compiling checks (Vincent Bernat) + - [73d42680fce8] sonmp: fix heap overflow when reading SONMP packets (Vincent Bernat) + - [9dee8deceb3b] build: provide a clearer message if pkg-config is not installed (Vincent Bernat) + - [afddd1bc830c] doc: add NEWS entry for latest commit (Vincent Bernat) + - [261afbe371ab] client: do not set VLAN tag if client did not set it (Vincent Bernat) + - [f6ad9aa7ad1f] doc: replace the old py.test references by pytest (Jose Pedro Oliveira) + - [20c1ef76e36b] interfaces: on OpenBSD, ensure we get a device before setting its flags (Vincent Bernat) + - [b5f1e342acc5] lldpcli: remove redundant "ports" parameters from cap and mgmt cmds (Yaroslav Fedoriachenko) + - [fed5564a9e78] build: more fallback to autoconf 2.69 (Vincent Bernat) + - [f3609abde3f2] build: fallback to use autoconf 2.69 again (Vincent Bernat) + - [bc6cf97858ea] build: update to autoconf 2.71 (Vincent Bernat) + - [837d5d19d514] tests: make decode work without libcheck (Vincent Bernat) + - [29203ab26cd8] doc: update link to the Wireshark's LLDP Wiki page (Jose Pedro Oliveira) + - [acc673f95eb3] Fix illumos name typo (Brian Bennett) + - [7d60750c53b9] event: fix monitoring of the monitor process on Illuminos (Vincent Bernat) + - [4ed0cd5ceab3] priv: fix chroot creation (Vincent Bernat) + - [9864921a6825] priv: handle EROFS when creating chroot (Vincent Bernat) + - [f28fc79d7816] osx: replace plist by service in brew recipe (Vincent Bernat) + - [a8140f41b8cd] osx: update Brew recipe (Vincent Bernat) + - [5d5e930ebff3] doc: update NEWS file (Vincent Bernat) + - [d5b5adba9cb4] Add support for 2.5G, 5G, 25G, and 50G based Ethernet (#475) (quwer2) + - [b78587a4c494] interfaces-bsd: do not consider an interface when it is down (Vincent Bernat) + - [a818d643bd5a] ci: publish a release as a draft (Vincent Bernat) + - [cd5c1a6e0330] ci: unshallow repository on release (Vincent Bernat) + 1.0.12 [2021-08-20 22:25:09 +0200]: - [2129b015777e] release: 1.0.12 (Vincent Bernat) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/NEWS new/lldpd-1.0.13/NEWS --- old/lldpd-1.0.12/NEWS 2021-08-20 22:24:35.000000000 +0200 +++ new/lldpd-1.0.13/NEWS 2021-11-13 10:40:07.000000000 +0100 @@ -1,3 +1,11 @@ +lldpd (1.0.13) + * Fix: + + Add support for 2.5G, 5G, 25G and 50G based Ethernet (#475) + + Fix link-down detection on OpenBSD (#476) + + Fix LLDP packets encapsuled in VLAN 0 in some conditions + + Fix heap overflow when reading SONMP. CVE-2021-43612. + Thanks to Jeremy Galindo for discovering this one. + lldpd (1.0.12) * Fix: + Use a dedicated file lock to prevent concurrent changes from lldpcli. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/README.md new/lldpd-1.0.13/README.md --- old/lldpd-1.0.12/README.md 2021-06-22 09:42:55.000000000 +0200 +++ new/lldpd-1.0.13/README.md 2021-09-29 12:17:07.000000000 +0200 @@ -257,7 +257,7 @@ More information: * http://en.wikipedia.org/wiki/Link_Layer_Discovery_Protocol * http://standards.ieee.org/getieee802/download/802.1AB-2005.pdf - * http://wiki.wireshark.org/LinkLayerDiscoveryProtocol + * https://gitlab.com/wireshark/wireshark/-/wikis/LinkLayerDiscoveryProtocol ## Compatibility with older kernels @@ -362,7 +362,7 @@ afl-fuzz -i inputs -o outputs ./decode @@ There is a general test suite with `make check`. It's also possible to -run integration tests. They need [py.test](http://pytest.org/latest/) +run integration tests. They need [pytest](http://pytest.org/latest/) and rely on Linux containers to be executed. To enable code coverage, use: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/config.h.in new/lldpd-1.0.13/config.h.in --- old/lldpd-1.0.12/config.h.in 2021-08-20 22:27:41.000000000 +0200 +++ new/lldpd-1.0.13/config.h.in 2021-11-13 13:37:57.000000000 +0100 @@ -82,9 +82,6 @@ to 0 otherwise. */ #undef HAVE_MALLOC -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if you have the <netdb.h> header file. */ #undef HAVE_NETDB_H @@ -141,6 +138,9 @@ /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the <stdio.h> header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H @@ -282,7 +282,9 @@ /* Which user to use for privilege separation */ #undef PRIVSEP_USER -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Directory for systemd service files */ @@ -306,7 +308,7 @@ /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc -/* Define to `int' if <sys/types.h> does not define. */ +/* Define as a signed integer type capable of holding a process identifier. */ #undef pid_t /* Define to rpl_realloc if the replacement function should be used. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/configure.ac new/lldpd-1.0.13/configure.ac --- old/lldpd-1.0.12/configure.ac 2021-06-22 09:42:55.000000000 +0200 +++ new/lldpd-1.0.13/configure.ac 2021-11-13 10:40:07.000000000 +0100 @@ -14,7 +14,7 @@ [https://lldpd.github.io/]) AC_CONFIG_SRCDIR([src/log.c]) -AC_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile src/Makefile src/compat/Makefile @@ -54,6 +54,10 @@ AC_PROG_EGREP AC_PROG_AWK +# Check for pkg-config +m4_ifndef([PKG_CHECK_MODULES], [ + AC_MSG_ERROR([PKG_CHECK_MODULES not found. Please install pkg-config and re-run autogen.sh])]) + # Doxygen DX_HTML_FEATURE(ON) DX_DOT_FEATURE(OFF) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/libevent/config.h.in new/lldpd-1.0.13/libevent/config.h.in --- old/lldpd-1.0.12/libevent/config.h.in 2021-08-20 22:27:37.000000000 +0200 +++ new/lldpd-1.0.13/libevent/config.h.in 2021-11-13 13:37:53.000000000 +0100 @@ -143,8 +143,8 @@ /* Define to 1 if you have the <mach/mach_time.h> header file. */ #undef HAVE_MACH_MACH_TIME_H -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H +/* Define to 1 if you have the <minix/config.h> header file. */ +#undef HAVE_MINIX_CONFIG_H /* Define to 1 if you have the `mmap' function. */ #undef HAVE_MMAP @@ -233,6 +233,9 @@ /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the <stdio.h> header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H @@ -404,6 +407,9 @@ /* Define to 1 if you have the `vasprintf' function. */ #undef HAVE_VASPRINTF +/* Define to 1 if you have the <wchar.h> header file. */ +#undef HAVE_WCHAR_H + /* Define if kqueue works correctly with pipes */ #undef HAVE_WORKING_KQUEUE @@ -480,58 +486,112 @@ /* The size of `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS -/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This + macro is obsolete. */ #undef TIME_WITH_SYS_TIME /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* Enable threading extensions on Solaris. */ +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# undef _HPUX_ALT_XOPEN_SOCKET_API +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +# undef _MINIX +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +# undef _POSIX_SOURCE +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +# undef _POSIX_1_SOURCE +#endif +/* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# undef __STDC_WANT_IEC_60559_BFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# undef __STDC_WANT_IEC_60559_DFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# undef __STDC_WANT_IEC_60559_TYPES_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# undef __STDC_WANT_LIB_EXT2__ +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# undef __STDC_WANT_MATH_SPEC_FUNCS__ +#endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE #endif /* Version number of package */ #undef VERSION -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES -/* Define to 1 if on MINIX. */ -#undef _MINIX - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - /* Define to empty if `const' does not conform to ANSI C. */ #undef const @@ -541,7 +601,7 @@ #undef inline #endif -/* Define to `int' if <sys/types.h> does not define. */ +/* Define as a signed integer type capable of holding a process identifier. */ #undef pid_t /* Define to `unsigned int' if <sys/types.h> does not define. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/m4/alignof.m4 new/lldpd-1.0.13/m4/alignof.m4 --- old/lldpd-1.0.12/m4/alignof.m4 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/m4/alignof.m4 2021-09-21 09:47:03.000000000 +0200 @@ -3,10 +3,9 @@ # AC_DEFUN([lldp_CHECK_ALIGNOF],[ AC_CACHE_CHECK([whether compiler understands __alignof__], lldp_cv_check_alignof, [ - AC_TRY_COMPILE([], - [ return __alignof__(long); ], - [ lldp_cv_check_alignof="yes" ], - [ lldp_cv_check_alignof="no" ]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return __alignof__(long); ]])], + [ lldp_cv_check_alignof="yes" ], + [ lldp_cv_check_alignof="no" ]) ]) if test x"$lldp_cv_check_alignof" = x"yes"; then AC_DEFINE([HAVE_ALIGNOF], [1], [Define if __alignof__ operator is available]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/m4/ax_cflags_gcc_option.m4 new/lldpd-1.0.13/m4/ax_cflags_gcc_option.m4 --- old/lldpd-1.0.12/m4/ax_cflags_gcc_option.m4 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/m4/ax_cflags_gcc_option.m4 2021-09-21 09:47:03.000000000 +0200 @@ -81,15 +81,16 @@ AC_CACHE_CHECK([FLAGS for gcc m4_ifval($1,$1,-option)], VAR,[AS_VAR_SET([VAR],["no, unknown"]) AC_LANG_SAVE - AC_LANG_C + AC_LANG([C]) ac_save_[]FLAGS="$[]FLAGS" for ac_arg dnl in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC # do FLAGS="$ac_save_[]FLAGS $[]m4_ifval($2,$2,) "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` - AC_TRY_COMPILE([],[return 0;], - [AS_VAR_SET([VAR],[`echo $ac_arg | sed -e 's,.*% *,,'`]) ; break]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])], + [AS_VAR_SET([VAR],[`echo $ac_arg | sed -e 's,.*% *,,'`]) ; break], + []) done FLAGS="$ac_save_[]FLAGS" AC_LANG_RESTORE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/m4/ax_ld_check_flag.m4 new/lldpd-1.0.13/m4/ax_ld_check_flag.m4 --- old/lldpd-1.0.12/m4/ax_ld_check_flag.m4 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/m4/ax_ld_check_flag.m4 2021-09-21 09:55:17.000000000 +0200 @@ -50,7 +50,7 @@ #serial 6 AC_DEFUN([AX_LDFLAGS_OPTION],[ - AC_PREREQ([2.61]) + AC_PREREQ([2.69]) AC_REQUIRE([AC_PROG_SED]) flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'` @@ -59,7 +59,7 @@ [ax_cv_ld_check_flag_$flag],[ AC_LANG_SAVE - AC_LANG_C + AC_LANG([C]) save_LDFLAGS="$LDFLAGS" LDFLAGS="-Werror $LDFLAGS $[]m4_ifval($2,$2,) $1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/src/client/conf-lldp.c new/lldpd-1.0.13/src/client/conf-lldp.c --- old/lldpd-1.0.12/src/client/conf-lldp.c 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/src/client/conf-lldp.c 2021-09-22 09:17:57.000000000 +0200 @@ -745,7 +745,7 @@ commands_new(unconfigure_lldp, "capabilities-advertisements", "Don't enable chassis capabilities advertisement", - NULL, NULL, NULL), + cmd_check_no_env, NULL, "ports"), NEWLINE, "Don't enable chassis capabilities advertisement", NULL, cmd_chassis_cap_advertise, NULL); @@ -753,14 +753,14 @@ commands_new(configure_lldp, "management-addresses-advertisements", "Enable management addresses advertisement", - NULL, NULL, NULL), + cmd_check_no_env, NULL, "ports"), NEWLINE, "Enable management addresses advertisement", NULL, cmd_chassis_mgmt_advertise, "enable"); commands_new( commands_new(unconfigure_lldp, "management-addresses-advertisements", "Don't enable management addresses advertisement", - NULL, NULL, NULL), + cmd_check_no_env, NULL, "ports"), NEWLINE, "Don't enable management addresses advertisement", NULL, cmd_chassis_mgmt_advertise, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/src/daemon/client.c new/lldpd-1.0.13/src/daemon/client.c --- old/lldpd-1.0.12/src/daemon/client.c 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/src/daemon/client.c 2021-09-29 12:17:07.000000000 +0200 @@ -390,7 +390,7 @@ port->p_disable_rx = port->p_disable_tx = 1; break; } - if (set->vlan_tx_enabled >= -1) { + if (set->vlan_tx_enabled > -1) { port->p_vlan_tx_enabled = set->vlan_tx_enabled; port->p_vlan_tx_tag = set->vlan_tx_tag; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/src/daemon/event.c new/lldpd-1.0.13/src/daemon/event.c --- old/lldpd-1.0.12/src/daemon/event.c 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/src/daemon/event.c 2021-09-21 09:47:00.000000000 +0200 @@ -431,7 +431,7 @@ /* Check if we have some data available. We need to pass the socket in * non-blocking mode to be able to run the check without disruption. */ levent_make_socket_nonblocking(fd); - n = read(fd, &one, 0); err = errno; + n = read(fd, &one, 1); err = errno; levent_make_socket_blocking(fd); switch (n) { @@ -445,11 +445,10 @@ log_warnx("event", "monitor process has terminated, exit"); break; default: - /* Unfortunately, dead code, if we have data, we have requested - * 0 byte, so we will fall in the previous case. It seems safer - * to ask for 0 byte than asking for 1 byte. In the later case, - * if we have to speak with the monitor again before exiting, we - * would be out of sync. */ + /* This is a bit unsafe as we are now out-of-sync with the + * monitor. It would be safer to request 0 byte, but some OS + * (illumos) seem to take the shortcut that by asking 0 byte, + * we can just return 0 byte. */ log_warnx("event", "received unexpected data from monitor process, exit"); break; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/src/daemon/interfaces-bsd.c new/lldpd-1.0.13/src/daemon/interfaces-bsd.c --- old/lldpd-1.0.12/src/daemon/interfaces-bsd.c 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/src/daemon/interfaces-bsd.c 2021-09-22 09:17:57.000000000 +0200 @@ -433,8 +433,16 @@ "grabbing information on interface %s", ifaddr->ifa_name); device = ifbsd_extract_device(cfg, ifaddr); - if (device) + if (device) { +#if defined HOST_OS_OPENBSD + /* On OpenBSD, the interface can have IFF_RUNNING but be down. */ + struct if_data *ifdata; + ifdata = ifaddr->ifa_data; + if (!LINK_STATE_IS_UP(ifdata->ifi_link_state)) + device->flags &= ~IFF_RUNNING; +#endif TAILQ_INSERT_TAIL(interfaces, device, next); + } break; case AF_INET: case AF_INET6: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/src/daemon/interfaces-linux.c new/lldpd-1.0.13/src/daemon/interfaces-linux.c --- old/lldpd-1.0.12/src/daemon/interfaces-linux.c 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/src/daemon/interfaces-linux.c 2021-08-30 08:23:01.000000000 +0200 @@ -619,23 +619,50 @@ port->p_macphy.mau_type = (uset.base.duplex == DUPLEX_FULL) ? \ LLDP_DOT3_MAU_1000BASEXFD : LLDP_DOT3_MAU_1000BASEXHD; break; + case SPEED_2500: + port->p_macphy.mau_type = LLDP_DOT3_MAU_2P5GIGT; + break; + case SPEED_5000: + port->p_macphy.mau_type = LLDP_DOT3_MAU_5GIGT; + break; case SPEED_10000: - // For fiber, we tell 10GIGBASEX and for others, - // 10GIGBASER. It's not unusual to have 10GIGBASER on - // fiber either but we don't have 10GIGBASET for - // copper. No good solution. - port->p_macphy.mau_type = (uset.base.port == PORT_FIBRE) ? \ - LLDP_DOT3_MAU_10GIGBASELR : LLDP_DOT3_MAU_10GIGBASECX4; + // Distinguish between RJ45 BaseT, DAC BaseCX4, or Fibre BaseLR + if (uset.base.port == PORT_TP) { + port->p_macphy.mau_type = LLDP_DOT3_MAU_10GBASET; + } + else if (uset.base.port == PORT_FIBRE) { + port->p_macphy.mau_type = LLDP_DOT3_MAU_10GIGBASELR; + } + else if (uset.base.port == PORT_DA) { + port->p_macphy.mau_type = LLDP_DOT3_MAU_10GIGBASECX4; + } + break; + case SPEED_25000: + // Distinguish between RJ45 BaseT, DAC BaseCR, or Fibre BaseLR + if (uset.base.port == PORT_TP) { + port->p_macphy.mau_type = LLDP_DOT3_MAU_25GBASET; + } + else if (uset.base.port == PORT_FIBRE) { + port->p_macphy.mau_type = LLDP_DOT3_MAU_25GBASELR; + } + else if (uset.base.port == PORT_DA) { + port->p_macphy.mau_type = LLDP_DOT3_MAU_25GBASECR; + } break; case SPEED_40000: // Same kind of approximation. port->p_macphy.mau_type = (uset.base.port == PORT_FIBRE) ? \ LLDP_DOT3_MAU_40GBASELR4 : LLDP_DOT3_MAU_40GBASECR4; break; + case SPEED_50000: + // Same kind of approximation. + port->p_macphy.mau_type = (uset.base.port == PORT_FIBRE) ? \ + LLDP_DOT3_MAU_50GBASELR : LLDP_DOT3_MAU_50GBASECR; + break; case SPEED_100000: // Ditto port->p_macphy.mau_type = (uset.base.port == PORT_FIBRE) ? \ - LLDP_DOT3_MAU_100GBASELR4 : LLDP_DOT3_MAU_100GBASECR10; + LLDP_DOT3_MAU_100GBASELR4 : LLDP_DOT3_MAU_100GBASECR4; break; } if (uset.base.port == PORT_AUI) port->p_macphy.mau_type = LLDP_DOT3_MAU_AUI; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/src/daemon/priv.c new/lldpd-1.0.13/src/daemon/priv.c --- old/lldpd-1.0.12/src/daemon/priv.c 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/src/daemon/priv.c 2021-09-13 19:45:34.000000000 +0200 @@ -518,6 +518,27 @@ priv_exit_rc_status(rc, status); } +/* Create a subdirectory and check if it's here. */ +static int _mkdir(const char *pathname, mode_t mode) +{ + int save_errno; + if (mkdir(pathname, mode) == 0 || errno == EEXIST) { + errno = 0; + return 0; + } + + /* We can get EROFS on some platforms. Let's check if the directory exists. */ + save_errno = errno; + if (chdir(pathname) == -1) { + errno = save_errno; + return -1; + } + + /* We should restore current directory, but in the context we are + * running, we do not care. */ + return 0; +} + /* Create a directory recursively. */ static int mkdir_p(const char *pathname, mode_t mode) { @@ -533,14 +554,13 @@ for (current = path + 1; *current; current++) { if (*current != '/') continue; *current = '\0'; - if (mkdir(path, mode) != 0 && errno != EEXIST) + if (_mkdir(path, mode) != 0) return -1; *current = '/'; } - if (mkdir(path, mode) != 0 && errno != EEXIST) + if (_mkdir(path, mode) != 0) return -1; - errno = 0; return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/src/daemon/protocols/sonmp.c new/lldpd-1.0.13/src/daemon/protocols/sonmp.c --- old/lldpd-1.0.12/src/daemon/protocols/sonmp.c 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/src/daemon/protocols/sonmp.c 2021-11-13 13:20:11.000000000 +0100 @@ -311,7 +311,7 @@ length = s; pos = (u_int8_t*)frame; - if (length < SONMP_SIZE) { + if (length < SONMP_SIZE + 2*ETHER_ADDR_LEN + sizeof(u_int16_t)) { log_warnx("sonmp", "too short SONMP frame received on %s", hardware->h_ifname); goto malformed; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/src/daemon/protocols/sonmp.h new/lldpd-1.0.13/src/daemon/protocols/sonmp.h --- old/lldpd-1.0.12/src/daemon/protocols/sonmp.h 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/src/daemon/protocols/sonmp.h 2021-11-13 13:20:11.000000000 +0100 @@ -24,7 +24,7 @@ #define LLC_ORG_NORTEL { 0x00, 0x00, 0x81 } #define LLC_PID_SONMP_HELLO 0x01a2 #define LLC_PID_SONMP_FLATNET 0x01a1 -#define SONMP_SIZE (2*ETHER_ADDR_LEN + sizeof(u_int16_t) + 8) +#define SONMP_SIZE 19 struct sonmp_chassis { int type; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/src/lib/atoms/port.c new/lldpd-1.0.13/src/lib/atoms/port.c --- old/lldpd-1.0.12/src/lib/atoms/port.c 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/src/lib/atoms/port.c 2021-08-30 08:23:01.000000000 +0200 @@ -144,6 +144,72 @@ { LLDP_DOT3_MAU_100GBASESR10, "100GbaseSR10 - 100GBASE-R PCS/PMA over 10 lane multimode fiber" }, { LLDP_DOT3_MAU_100GBASELR4, "100GbaseLR4 - 100GBASE-R PCS/PMA over 4 WDM lane single mode fiber, long reach" }, { LLDP_DOT3_MAU_100GBASEER4, "100GbaseER4 - 100GBASE-R PCS/PMA over 4 WDM lane single mode fiber PMD, extended reach" }, + { LLDP_DOT3_MAU_1000BASET1, "1000baseT1 - 1000BASE-T1 single balanced twisted-pair copper cabling PHY" }, + { LLDP_DOT3_MAU_1000BASEPX30D, "1000basePX30D - One single-mode fiber EPON OLT, 20km, 1:32 split ratio" }, + { LLDP_DOT3_MAU_1000BASEPX30U, "1000basePX30U - One single-mode fiber EPON ONU, 20km, 1:32 split ratio" }, + { LLDP_DOT3_MAU_1000BASEPX40D, "1000basePX40D - One single-mode fiber EPON OLT, 20km, 1:64 split ratio" }, + { LLDP_DOT3_MAU_1000BASEPX40U, "1000basePX40U - One single-mode fiber EPON ONU, 20km, 1:64 split ratio" }, + { LLDP_DOT3_MAU_10G1GBASEPRXD4, "10G1GbasePRXD4 - One single-mode fiber asymmetric-rate EPON OLT, supporting extended power budget (PRX40)" }, + { LLDP_DOT3_MAU_10G1GBASEPRXU4, "10G1GbasePRXU4 - One single-mode fiber asymmetric-rate EPON ONU, supporting extended power budget (PRX40)" }, + { LLDP_DOT3_MAU_10GBASEPRD4, "10GbasePRD4 - One single-mode fiber symmetric-rate EPON OLT, supporting extended power budget (PR40)" }, + { LLDP_DOT3_MAU_10GBASEPRU4, "10GbasePRU4 - One single-mode fiber symmetric-rate EPON ONU, supporting extended power budget (PR40)" }, + { LLDP_DOT3_MAU_25GBASECR, "25GbaseCR - 25GBASE-R PCS/PMA over shielded balanced copper cable" }, + { LLDP_DOT3_MAU_25GBASECRS, "25GbaseCRS - 25GBASE-R PCS/PMA over shielded balanced copper cable without RS-FEC" }, + { LLDP_DOT3_MAU_25GBASEKR, "25GbaseKR - 25GBASE-R PCS/PMA over an electrical backplane" }, + { LLDP_DOT3_MAU_25GBASEKRS, "25GbaseKRS - 25GBASE-R PCS/PMA over an electrical backplane without RS-FEC" }, + { LLDP_DOT3_MAU_25GBASER, "25GbaseR - 25GBASE-R PCS/PMA over undefined PMD" }, + { LLDP_DOT3_MAU_25GBASESR, "25GbaseSR - 25GBASE-R PCS/PMA over multimode fiber" }, + { LLDP_DOT3_MAU_25GBASET, "25GbaseT - Four-pair twisted-pair balanced copper cabling" }, + { LLDP_DOT3_MAU_40GBASEER4, "40GbaseER4 - 40GBASE-R PCS/PMA over 4 WDM lane single mode fiber" }, + { LLDP_DOT3_MAU_40GBASER, "40GbaseR - 40GBASE-R PCS as over undefined PMA/PMD" }, + { LLDP_DOT3_MAU_40GBASET, "40GbaseT - Four-pair twisted-pair balanced copper cabling" }, + { LLDP_DOT3_MAU_100GBASECR4, "100GbaseCR4 - 100GBASE-R PCS/PMA over 4 lane shielded copper balanced cable" }, + { LLDP_DOT3_MAU_100GBASEKR4, "100GbaseKR4 - 100GBASE-R PCS/PMA over an electrical backplane" }, + { LLDP_DOT3_MAU_100GBASEKP4, "100GbaseKP4 - 100GBASE-P PCS/PMA over an electrical backplane PMD" }, + { LLDP_DOT3_MAU_100GBASER, "100GbaseR - 100GBASE-R Multi-lane PCS over undefined PMA/PMD" }, + { LLDP_DOT3_MAU_100GBASESR4, "100GbaseSR4 - 100GBASE-R PCS/PMA over 4 lane multimode fiber" }, + { LLDP_DOT3_MAU_2P5GIGT, "2p5GigT - 2.5GBASE-T Four-pair twisted-pair balanced copper cabling PHY" }, + { LLDP_DOT3_MAU_5GIGT, "5GigT - 5GBASE-T Four-pair twisted-pair balanced copper cabling PHY" }, + { LLDP_DOT3_MAU_100BASET1, "100baseT1 - 100BASE-T1 Single balanced twisted-pair copper cabling PHY" }, + { LLDP_DOT3_MAU_1000BASERHA, "1000baseRHA - 1000BASE-RHA Plastic optical fiber PHY" }, + { LLDP_DOT3_MAU_1000BASERHB, "1000baseRHB - 1000BASE-RHB Plastic optical fiber PHY" }, + { LLDP_DOT3_MAU_1000BASERHC, "1000baseRHC - 1000BASE-RHC Plastic optical fiber PHY" }, + { LLDP_DOT3_MAU_2P5GBASEKX, "2p5GbaseKX - 2.5GBASE-X PMD over an electrical backplane" }, + { LLDP_DOT3_MAU_2P5GBASEX, "2p5GbaseX - 2.5GBASE-X PCS/PMA over undefined PMD" }, + { LLDP_DOT3_MAU_5GBASEKR, "5GbaseKR - 5GBASE-KR PMD over an electrical backplane" }, + { LLDP_DOT3_MAU_5GBASER, "5GbaseR - 5GBASE-R PCS/PMA over undefined PMD" }, + { LLDP_DOT3_MAU_10GPASSXR, "10GpassXR - Coax cable distribution network PHY continuous downstream/burst mode upstream PHY" }, + { LLDP_DOT3_MAU_25GBASELR, "25GbaseLR - 25GBASE-R PCS/PMA over single-mode fiber PMD, with long reach" }, + { LLDP_DOT3_MAU_25GBASEER, "25GbaseER - 25GBASE-R PCS/PMA over single-mode fiber PMD, with extended reach" }, + { LLDP_DOT3_MAU_50GBASER, "50GbaseR - 50GBASE-R Multi-lane PCS over undefined PMA/PMD" }, + { LLDP_DOT3_MAU_50GBASECR, "50GbaseCR - 50GBASE-R PCS/PMA over shielded copper balanced cable PMD" }, + { LLDP_DOT3_MAU_50GBASEKR, "50GbaseKR - 50GBASE-R PCS/PMA over an electrical backplane PMD" }, + { LLDP_DOT3_MAU_50GBASESR, "50GbaseSR - 50GBASE-R PCS/PMA over multimode fiber PMD" }, + { LLDP_DOT3_MAU_50GBASEFR, "50GbaseFR - 50GBASE-R PCS/PMA over single mode fiber PMD with reach up to at least 2 km" }, + { LLDP_DOT3_MAU_50GBASELR, "50GbaseLR - 50GBASE-R PCS/PMA over single mode fiber PMD with reach up to at least 10 km" }, + { LLDP_DOT3_MAU_50GBASEER, "50GbaseER - 50GBASE-R PCS/PMA over single-mode fiber PMD with reach up to at least 40 km" }, + { LLDP_DOT3_MAU_100GBASECR2, "100GbaseCR2 - 100GBASE-R PCS/PMA over 2 lane shielded copper balanced cable PMD" }, + { LLDP_DOT3_MAU_100GBASEKR2, "100GbaseKR2 - 100GBASE-R PCS/PMA over an electrical backplane PMD" }, + { LLDP_DOT3_MAU_100GBASESR2, "100GbaseSR2 - 100GBASE-R PCS/PMA over 2 lane multimode fiber PMD" }, + { LLDP_DOT3_MAU_100GBASEDR, "100GbaseDR - 100GBASE-R PCS/PMA over single mode fiber PMD" }, + { LLDP_DOT3_MAU_200GBASER, "200GbaseR - 200GBASE-R Multi-lane PCS over undefined PMA/PMD" }, + { LLDP_DOT3_MAU_200GBASEDR4, "200GbaseDR4 - 200GBASE-R PCS/PMA over 4-lane single-mode fiber PMD" }, + { LLDP_DOT3_MAU_200GBASEFR4, "200GbaseFR4 - 200GBASE-R PCS/PMA over 4 WDM lane single-mode fiber PMD with reach up to at least 2 km" }, + { LLDP_DOT3_MAU_200GBASELR4, "200GbaseLR4 - 200GBASE-R PCS/PMA over 4 WDM lane single-mode fiber PMD with reach up to at least 10 km" }, + { LLDP_DOT3_MAU_200GBASECR4, "200GbaseCR4 - 200GBASE-R PCS/PMA over 4 lane shielded copper balanced cable PMD" }, + { LLDP_DOT3_MAU_200GBASEKR4, "200GbaseKR4 - 200GBASE-R PCS/PMA over an electrical backplane PMD" }, + { LLDP_DOT3_MAU_200GBASESR4, "200GbaseSR4 - 200GBASE-R PCS/PMA over 4 lane multimode fiber PMD" }, + { LLDP_DOT3_MAU_200GBASEER4, "200GbaseER4 - 200GBASE-R PCS/PMA over 4 WDM lane single-mode fiber PMD with reach up to at least 40 km" }, + { LLDP_DOT3_MAU_400GBASER, "400GbaseR - 400GBASE-R Multi-lane PCS over undefined PMA/PMD" }, + { LLDP_DOT3_MAU_400GBASESR16, "400GbaseSR16 - 400GBASE-R PCS/PMA over 16-lane multimode fiber PMD" }, + { LLDP_DOT3_MAU_400GBASEDR4, "400GbaseDR4 - 400GBASE-R PCS/PMA over 4-lane single-mode fiber PMD" }, + { LLDP_DOT3_MAU_400GBASEFR8, "400GbaseFR8 - 400GBASE-R PCS/PMA over 8 WDM lane single-mode fiber PMD with reach up to at least 2 km" }, + { LLDP_DOT3_MAU_400GBASELR8, "400GbaseLR8 - 400GBASE-R PCS/PMA over 8 WDM lane single-mode fiber PMD with reach up to at least 10 km" }, + { LLDP_DOT3_MAU_400GBASEER8, "400GbaseER8 - 400GBASE-R PCS/PMA over 8 WDM lane single-mode fiber PMD with reach up to at least 40 km" }, + { LLDP_DOT3_MAU_10BASET1L, "10baseT1L - 10BASE-T1L Single balanced pair PHY" }, + { LLDP_DOT3_MAU_10BASET1SHD, "10baseT1SHD - 10BASE-T1S Single balanced pair PHY, half duplex mode" }, + { LLDP_DOT3_MAU_10BASET1SMD, "10baseT1SMD - 10BASE-T1S Single balanced pair PHY, multidrop mode" }, + { LLDP_DOT3_MAU_10BASET1SFD, "10baseT1SFD - 10BASE-T1S Single balanced pair PHY, full duplex mode" }, { 0, NULL } }; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/src/lldp-const.h new/lldpd-1.0.13/src/lldp-const.h --- old/lldpd-1.0.12/src/lldp-const.h 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/src/lldp-const.h 2021-08-30 08:23:01.000000000 +0200 @@ -126,6 +126,72 @@ #define LLDP_DOT3_MAU_100GBASESR10 76 #define LLDP_DOT3_MAU_100GBASELR4 77 #define LLDP_DOT3_MAU_100GBASEER4 78 +#define LLDP_DOT3_MAU_1000BASET1 79 +#define LLDP_DOT3_MAU_1000BASEPX30D 80 +#define LLDP_DOT3_MAU_1000BASEPX30U 81 +#define LLDP_DOT3_MAU_1000BASEPX40D 82 +#define LLDP_DOT3_MAU_1000BASEPX40U 83 +#define LLDP_DOT3_MAU_10G1GBASEPRXD4 84 +#define LLDP_DOT3_MAU_10G1GBASEPRXU4 85 +#define LLDP_DOT3_MAU_10GBASEPRD4 86 +#define LLDP_DOT3_MAU_10GBASEPRU4 87 +#define LLDP_DOT3_MAU_25GBASECR 88 +#define LLDP_DOT3_MAU_25GBASECRS 89 +#define LLDP_DOT3_MAU_25GBASEKR 90 +#define LLDP_DOT3_MAU_25GBASEKRS 91 +#define LLDP_DOT3_MAU_25GBASER 92 +#define LLDP_DOT3_MAU_25GBASESR 93 +#define LLDP_DOT3_MAU_25GBASET 94 +#define LLDP_DOT3_MAU_40GBASEER4 95 +#define LLDP_DOT3_MAU_40GBASER 96 +#define LLDP_DOT3_MAU_40GBASET 97 +#define LLDP_DOT3_MAU_100GBASECR4 98 +#define LLDP_DOT3_MAU_100GBASEKR4 99 +#define LLDP_DOT3_MAU_100GBASEKP4 100 +#define LLDP_DOT3_MAU_100GBASER 101 +#define LLDP_DOT3_MAU_100GBASESR4 102 +#define LLDP_DOT3_MAU_2P5GIGT 103 +#define LLDP_DOT3_MAU_5GIGT 104 +#define LLDP_DOT3_MAU_100BASET1 105 +#define LLDP_DOT3_MAU_1000BASERHA 106 +#define LLDP_DOT3_MAU_1000BASERHB 107 +#define LLDP_DOT3_MAU_1000BASERHC 108 +#define LLDP_DOT3_MAU_2P5GBASEKX 109 +#define LLDP_DOT3_MAU_2P5GBASEX 110 +#define LLDP_DOT3_MAU_5GBASEKR 111 +#define LLDP_DOT3_MAU_5GBASER 112 +#define LLDP_DOT3_MAU_10GPASSXR 113 +#define LLDP_DOT3_MAU_25GBASELR 114 +#define LLDP_DOT3_MAU_25GBASEER 115 +#define LLDP_DOT3_MAU_50GBASER 116 +#define LLDP_DOT3_MAU_50GBASECR 117 +#define LLDP_DOT3_MAU_50GBASEKR 118 +#define LLDP_DOT3_MAU_50GBASESR 119 +#define LLDP_DOT3_MAU_50GBASEFR 120 +#define LLDP_DOT3_MAU_50GBASELR 121 +#define LLDP_DOT3_MAU_50GBASEER 122 +#define LLDP_DOT3_MAU_100GBASECR2 123 +#define LLDP_DOT3_MAU_100GBASEKR2 124 +#define LLDP_DOT3_MAU_100GBASESR2 125 +#define LLDP_DOT3_MAU_100GBASEDR 126 +#define LLDP_DOT3_MAU_200GBASER 127 +#define LLDP_DOT3_MAU_200GBASEDR4 128 +#define LLDP_DOT3_MAU_200GBASEFR4 129 +#define LLDP_DOT3_MAU_200GBASELR4 130 +#define LLDP_DOT3_MAU_200GBASECR4 131 +#define LLDP_DOT3_MAU_200GBASEKR4 132 +#define LLDP_DOT3_MAU_200GBASESR4 133 +#define LLDP_DOT3_MAU_200GBASEER4 134 +#define LLDP_DOT3_MAU_400GBASER 135 +#define LLDP_DOT3_MAU_400GBASESR16 136 +#define LLDP_DOT3_MAU_400GBASEDR4 137 +#define LLDP_DOT3_MAU_400GBASEFR8 138 +#define LLDP_DOT3_MAU_400GBASELR8 139 +#define LLDP_DOT3_MAU_400GBASEER8 140 +#define LLDP_DOT3_MAU_10BASET1L 141 +#define LLDP_DOT3_MAU_10BASET1SHD 142 +#define LLDP_DOT3_MAU_10BASET1SMD 143 +#define LLDP_DOT3_MAU_10BASET1SFD 144 /* Dot3 Power Devicetype */ #define LLDP_DOT3_POWER_PSE 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/tests/Makefile.am new/lldpd-1.0.13/tests/Makefile.am --- old/lldpd-1.0.12/tests/Makefile.am 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/tests/Makefile.am 2021-11-13 13:29:40.000000000 +0100 @@ -2,15 +2,26 @@ AM_CPPFLAGS = $(LLDP_CPPFLAGS) AM_LDFLAGS = $(LLDP_LDFLAGS) $(LLDP_BIN_LDFLAGS) -if HAVE_CHECK +check_PROGRAMS = decode + +decode_SOURCES = decode.c \ + $(top_srcdir)/src/daemon/lldpd.h \ + pcap-hdr.h -TESTS = check_marshal check_pattern check_bitmap check_fixedpoint \ - check_lldp check_cdp check_sonmp check_edp -AM_CFLAGS += @check_CFLAGS@ LDADD = $(top_builddir)/src/daemon/liblldpd.la @check_LIBS@ @libevent_LDFLAGS@ if ENABLE_SYSTEMTAP LDADD += $(top_builddir)/src/daemon/probes.o endif +if USE_SNMP +LDADD += @NETSNMP_LIBS@ +endif + +if HAVE_CHECK + +TESTS = check_marshal check_pattern check_bitmap check_fixedpoint \ + check_lldp check_cdp check_sonmp check_edp +AM_CFLAGS += @check_CFLAGS@ -Wno-format-extra-args +LDADD += @check_LIBS@ check_marshal_SOURCES = check_marshal.c \ $(top_srcdir)/src/marshal.h \ @@ -24,19 +35,19 @@ check_lldp_SOURCES = check_lldp.c \ $(top_srcdir)/src/daemon/lldpd.h \ - common.h common.c check-compat.h + common.h common.c check-compat.h pcap-hdr.h check_cdp_SOURCES = check_cdp.c \ $(top_srcdir)/src/daemon/lldpd.h \ - common.h common.c check-compat.h + common.h common.c check-compat.h pcap-hdr.h check_sonmp_SOURCES = check_sonmp.c \ $(top_srcdir)/src/daemon/lldpd.h \ - common.h common.c check-compat.h + common.h common.c check-compat.h pcap-hdr.h check_edp_SOURCES = check_edp.c \ $(top_srcdir)/src/daemon/lldpd.h \ - common.h common.c check-compat.h + common.h common.c check-compat.h pcap-hdr.h check_fixedpoint_SOURCES = check_fixedpoint.c check_fixedpoint_LDADD = $(top_builddir)/src/lib/libfixedpoint.la $(LDADD) @@ -46,13 +57,9 @@ check_snmp_SOURCES = check_snmp.c \ $(top_srcdir)/src/daemon/lldpd.h \ $(top_srcdir)/src/daemon/agent.h -LDADD += @NETSNMP_LIBS@ endif -check_PROGRAMS = $(TESTS) decode -decode_SOURCES = decode.c \ - $(top_srcdir)/src/daemon/lldpd.h \ - common.h common.c +check_PROGRAMS += $(TESTS) endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/tests/check_sonmp.c new/lldpd-1.0.13/tests/check_sonmp.c --- old/lldpd-1.0.12/tests/check_sonmp.c 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/tests/check_sonmp.c 2021-11-13 13:20:11.000000000 +0100 @@ -33,7 +33,7 @@ IEEE 802.3 Ethernet Destination: Bay-Networks-(Synoptics)-autodiscovery (01:00:81:00:01:00) Source: 5e:10:8e:e7:84:ad (5e:10:8e:e7:84:ad) - Length: 22 + Length: 19 Logical-Link Control DSAP: SNAP (0xaa) IG Bit: Individual @@ -55,7 +55,7 @@ IEEE 802.3 Ethernet Destination: Bay-Networks-(Synoptics)-autodiscovery (01:00:81:00:01:01) Source: 5e:10:8e:e7:84:ad (5e:10:8e:e7:84:ad) - Length: 22 + Length: 19 Logical-Link Control DSAP: SNAP (0xaa) IG Bit: Individual @@ -76,13 +76,13 @@ */ char pkt1[] = { 0x01, 0x00, 0x81, 0x00, 0x01, 0x00, 0x5e, 0x10, - 0x8e, 0xe7, 0x84, 0xad, 0x00, 0x16, 0xaa, 0xaa, + 0x8e, 0xe7, 0x84, 0xad, 0x00, 0x13, 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x81, 0x01, 0xa2, 0xac, 0x11, 0x8e, 0x25, 0x00, 0x00, 0x04, 0x01, 0x0c, 0x03, 0x01 }; char pkt2[] = { 0x01, 0x00, 0x81, 0x00, 0x01, 0x01, 0x5e, 0x10, - 0x8e, 0xe7, 0x84, 0xad, 0x00, 0x16, 0xaa, 0xaa, + 0x8e, 0xe7, 0x84, 0xad, 0x00, 0x13, 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x81, 0x01, 0xa1, 0xac, 0x11, 0x8e, 0x25, 0x00, 0x00, 0x04, 0x01, 0x0c, 0x03, 0x01 }; @@ -99,7 +99,7 @@ chassis.c_id_len = ETHER_ADDR_LEN; TAILQ_INIT(&chassis.c_mgmt); addr = inet_addr("172.17.142.37"); - mgmt = lldpd_alloc_mgmt(LLDPD_AF_IPV4, + mgmt = lldpd_alloc_mgmt(LLDPD_AF_IPV4, &addr, sizeof(in_addr_t), 0); if (mgmt == NULL) ck_abort(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/tests/common.h new/lldpd-1.0.13/tests/common.h --- old/lldpd-1.0.12/tests/common.h 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/tests/common.h 2021-09-21 09:47:00.000000000 +0200 @@ -19,27 +19,9 @@ #define _COMMON_H #include "check-compat.h" +#include "pcap-hdr.h" #include "../src/daemon/lldpd.h" -/* See: - * http://wiki.wireshark.org/Development/LibpcapFileFormat - */ -struct pcap_hdr { - u_int32_t magic_number; /* magic number */ - u_int16_t version_major; /* major version number */ - u_int16_t version_minor; /* minor version number */ - u_int32_t thiszone; /* GMT to local correction */ - u_int32_t sigfigs; /* accuracy of timestamps */ - u_int32_t snaplen; /* max length of captured packets, in octets */ - u_int32_t network; /* data link type */ -}; -struct pcaprec_hdr { - u_int32_t ts_sec; /* timestamp seconds */ - u_int32_t ts_usec; /* timestamp microseconds */ - u_int32_t incl_len; /* number of octets of packet saved in file */ - u_int32_t orig_len; /* actual length of packet */ -}; - struct packet { TAILQ_ENTRY(packet) next; int size; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/tests/decode.c new/lldpd-1.0.13/tests/decode.c --- old/lldpd-1.0.12/tests/decode.c 2021-05-04 21:37:05.000000000 +0200 +++ new/lldpd-1.0.13/tests/decode.c 2021-09-21 09:47:00.000000000 +0200 @@ -22,12 +22,11 @@ #include <sys/stat.h> #include <fcntl.h> #include <arpa/inet.h> -#include "common.h" +#include "pcap-hdr.h" +#include "../src/daemon/lldpd.h" #define BUFSIZE 2000 -char filenameprefix[] = "decode"; - static void usage(void) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lldpd-1.0.12/tests/pcap-hdr.h new/lldpd-1.0.13/tests/pcap-hdr.h --- old/lldpd-1.0.12/tests/pcap-hdr.h 1970-01-01 01:00:00.000000000 +0100 +++ new/lldpd-1.0.13/tests/pcap-hdr.h 2021-09-21 09:47:00.000000000 +0200 @@ -0,0 +1,25 @@ +#ifndef _PCAP_HDR_H +#define _PCAP_HDR_H + +#include <stdint.h> + +/* See: + * http://wiki.wireshark.org/Development/LibpcapFileFormat + */ +struct pcap_hdr { + uint32_t magic_number; /* magic number */ + uint16_t version_major; /* major version number */ + uint16_t version_minor; /* minor version number */ + uint32_t thiszone; /* GMT to local correction */ + uint32_t sigfigs; /* accuracy of timestamps */ + uint32_t snaplen; /* max length of captured packets, in octets */ + uint32_t network; /* data link type */ +}; +struct pcaprec_hdr { + uint32_t ts_sec; /* timestamp seconds */ + uint32_t ts_usec; /* timestamp microseconds */ + uint32_t incl_len; /* number of octets of packet saved in file */ + uint32_t orig_len; /* actual length of packet */ +}; + +#endif