Hello community,

here is the log from the commit of package lldpd for openSUSE:Factory checked 
in at 2019-06-17 10:34:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lldpd (Old)
 and      /work/SRC/openSUSE:Factory/.lldpd.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lldpd"

Mon Jun 17 10:34:58 2019 rev:8 rq:710239 version:1.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/lldpd/lldpd.changes      2019-02-15 
10:03:08.599611406 +0100
+++ /work/SRC/openSUSE:Factory/.lldpd.new.4811/lldpd.changes    2019-06-17 
10:35:02.821213003 +0200
@@ -1,0 +2,13 @@
+Sun Jun 16 14:22:28 UTC 2019 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 1.0.4:
+  Changes:
+  * Add "configure system max-neighbors XX" command to modify maximum
+    of neighbors accepted per port.
+  * Implement lldpRemOrgDefInfoTable table for custom TLVs.
+  * Fix:
+  * Better compliance for statsTLVsUnrecognizedTotal and
+    statsAgeoutsTotal counters.
+  * On Linux, handle rare blocking case in Netlink code.
+
+-------------------------------------------------------------------

Old:
----
  lldpd-1.0.3.tar.gz
  lldpd-1.0.3.tar.gz.asc

New:
----
  lldpd-1.0.4.tar.gz
  lldpd-1.0.4.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lldpd.spec ++++++
--- /var/tmp/diff_new_pack.bDGMYe/_old  2019-06-17 10:35:03.449212689 +0200
+++ /var/tmp/diff_new_pack.bDGMYe/_new  2019-06-17 10:35:03.453212687 +0200
@@ -26,7 +26,7 @@
   %define _fillupdir %{_localstatedir}/adm/fillup-templates
 %endif
 Name:           lldpd
-Version:        1.0.3
+Version:        1.0.4
 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.3.tar.gz -> lldpd-1.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/.dist-version 
new/lldpd-1.0.4/.dist-version
--- old/lldpd-1.0.3/.dist-version       2018-12-10 15:03:43.000000000 +0100
+++ new/lldpd-1.0.4/.dist-version       2019-06-15 11:14:46.000000000 +0200
@@ -1 +1 @@
-1.0.3
+1.0.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/ChangeLog new/lldpd-1.0.4/ChangeLog
--- old/lldpd-1.0.3/ChangeLog   2018-12-10 15:03:42.000000000 +0100
+++ new/lldpd-1.0.4/ChangeLog   2019-06-15 11:14:45.000000000 +0200
@@ -1,3 +1,29 @@
+1.0.4 [2019-06-15 11:09:44 +0200]:
+
+ - [1507a0035694] release: 1.0.4 (Vincent Bernat)
+ - [4a1fb0acb1e4] lldpd: document expectation for LLDP-MED device 
configuration (Vincent Bernat)
+ - [66a551ed239d] netlink: make the netlink socket totally non blocking 
(Vincent Bernat)
+ - [6c3697f21295] netlink: handle blocking read from netlink socket (Vincent 
Bernat)
+ - [8ca3da075bfc] snmp: implement lldpRemOrgDefInfoTable for remote custom 
TLVs (Vincent Bernat)
+ - [10da5bcb106b] debian: depends on lsb-base (Vincent Bernat)
+ - [fe28f2c441fc] debian: no need to BD on lsb-release anymore (Vincent Bernat)
+ - [653838a396cc] doc: update Android instructions for ARM64 (Vincent Bernat)
+ - [fbb30189306c] client: use bold instead of a color for command completions 
(Vincent Bernat)
+ - [26b82f3f7c35] agent: do not increase statsAgeoutsTotal when receiving a 
shutdown frame (Vincent Bernat)
+ - [109bcd423cd5] lldp: increase statsTLVsUnrecognizedTotal on unknown TLV 
(Vincent Bernat)
+ - [da94dd1fff77] tests: update pytest (Vincent Bernat)
+ - [6e3cb2f550fb] client: rename max-neighbor command (Vincent Bernat)
+ - [1adf91794dd5] tests: add test for global configuration settings (Vincent 
Bernat)
+ - [ba1bdf6aaf76] client: ability to set maximum of neighbors from lldpcli 
(Vincent Bernat)
+ - [b2eebb31fc21] priv: include limits.h for PATH_MAX (Sören Tempel)
+ - [0ca212866b3c] lib: use an unique variable as iterator in foreach macro 
(Vincent Bernat)
+ - [d0058aa62e1c] build: warn on implicit fallthrough for case statements 
(Vincent Bernat)
+ - [adbb26bc0a49] build: enable increased reliability of stack overflow 
detection (Vincent Bernat)
+ - [a636b31d72ea] interfaces/linux: make dsa special (Brandon Streiff)
+ - [4e7ec8233cd1] build: fix compilation with `--enable-fdp --disable-cdp` 
(Vincent Bernat)
+ - [cd752e02254d] daemon: allow lseek for seccomp (Vincent Bernat)
+ - [499046a8dfd1] osx: update version in HomeBrew formula (Vincent Bernat)
+
 1.0.3 [2018-12-10 15:02:58 +0100]:
 
  - [0c08843c9014] release: 1.0.3 (Vincent Bernat)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/Makefile.in new/lldpd-1.0.4/Makefile.in
--- old/lldpd-1.0.3/Makefile.in 2018-12-10 15:03:27.000000000 +0100
+++ new/lldpd-1.0.4/Makefile.in 2019-06-15 11:14:21.000000000 +0200
@@ -234,7 +234,7 @@
 CSCOPE = cscope
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
        $(srcdir)/doxygen.am ChangeLog NEWS ar-lib compile \
-       config.guess config.sub install-sh ltmain.sh missing
+       config.guess config.sub depcomp install-sh ltmain.sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/NEWS new/lldpd-1.0.4/NEWS
--- old/lldpd-1.0.3/NEWS        2018-12-10 14:54:19.000000000 +0100
+++ new/lldpd-1.0.4/NEWS        2019-06-12 21:51:07.000000000 +0200
@@ -1,3 +1,13 @@
+lldpd (1.0.4)
+  * Changes:
+    + Add "configure system max-neighbors XX" command to modify maximum
+      of neighbors accepted per port.
+    + Implement lldpRemOrgDefInfoTable table for custom TLVs.
+  * Fix:
+    + Better compliance for statsTLVsUnrecognizedTotal and
+      statsAgeoutsTotal counters.
+    + On Linux, handle rare blocking case in Netlink code.
+
 lldpd (1.0.3)
   * Fix:
     + Fix creation of chroot directory.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/README.md new/lldpd-1.0.4/README.md
--- old/lldpd-1.0.3/README.md   2018-11-07 20:19:58.000000000 +0100
+++ new/lldpd-1.0.4/README.md   2019-05-18 17:46:44.000000000 +0200
@@ -115,11 +115,11 @@
 ----------------------
 
 You need to download [Android NDK][]. Once unpacked, you can generate
-a toolchain using the following command:
+a toolchain using the following command (for ARM64):
 
     ./build/tools/make-standalone-toolchain.sh \
-        --platform=android-9 \
-        --arch=arm \
+        --platform=android-24 \
+        --arch=arm64 \
         --install-dir=../android-toolchain
     export TOOLCHAIN=$PWD/../android-toolchain
 
@@ -128,7 +128,7 @@
     mkdir build && cd build
     export PATH=$PATH:$TOOLCHAIN/bin
     ../configure \
-        --host=arm-linux-androideabi \
+        --host=arm64-linux-androideabi \
         --with-sysroot=$TOOLCHAIN/sysroot \
         --prefix=/system \
         --sbindir=/system/bin \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/configure new/lldpd-1.0.4/configure
--- old/lldpd-1.0.3/configure   2018-12-10 15:03:26.000000000 +0100
+++ new/lldpd-1.0.4/configure   2019-06-15 11:14:20.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.3.
+# Generated by GNU Autoconf 2.69 for lldpd 1.0.4.
 #
 # Report bugs to <https://github.com/vincentbernat/lldpd/issues>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='lldpd'
 PACKAGE_TARNAME='lldpd'
-PACKAGE_VERSION='1.0.3'
-PACKAGE_STRING='lldpd 1.0.3'
+PACKAGE_VERSION='1.0.4'
+PACKAGE_STRING='lldpd 1.0.4'
 PACKAGE_BUGREPORT='https://github.com/vincentbernat/lldpd/issues'
 PACKAGE_URL='http://vincentbernat.github.io/lldpd/'
 
@@ -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.3 to adapt to many kinds of systems.
+\`configure' configures lldpd 1.0.4 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.3:";;
+     short | recursive ) echo "Configuration of lldpd 1.0.4:";;
    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.3
+lldpd configure 1.0.4
 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.3, which was
+It was created by lldpd $as_me 1.0.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3159,7 +3159,7 @@
 
 # Define the identity of the package.
  PACKAGE='lldpd'
- VERSION='1.0.3'
+ VERSION='1.0.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16258,6 +16258,70 @@
  ;;
 esac
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for gcc 
-Wimplicit-fallthrough" >&5
+$as_echo_n "checking CFLAGS for gcc -Wimplicit-fallthrough... " >&6; }
+if ${ac_cv_cflags_gcc_option__Wimplicit_fallthrough+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_cflags_gcc_option__Wimplicit_fallthrough="no, unknown"
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext 
$LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_save_CFLAGS="$CFLAGS"
+for ac_arg in "-pedantic -Werror % -Wimplicit-fallthrough"     "-pedantic % 
-Wimplicit-fallthrough %% no, obsolete"     #
+do CFLAGS="$ac_save_CFLAGS $LLDP_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 
's,%,,'`
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_cflags_gcc_option__Wimplicit_fallthrough=`echo $ac_arg | sed -e 's,.*% 
*,,'` ; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+ CFLAGS="$ac_save_CFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext 
$LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$ac_cv_cflags_gcc_option__Wimplicit_fallthrough" >&5
+$as_echo "$ac_cv_cflags_gcc_option__Wimplicit_fallthrough" >&6; }
+ac_res=$ac_cv_cflags_gcc_option__Wimplicit_fallthrough
+case ".${ac_res}" in
+     .ok|.ok,*)  ;;
+   .|.no|.no,*)  ;;
+   *)
+   if echo " $LLDP_CFLAGS " | grep " ${ac_res} " 2>&1 >/dev/null
+   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : LLDP_CFLAGS does contain 
\${ac_res}"; } >&5
+  (: LLDP_CFLAGS does contain ${ac_res}) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : 
LLDP_CFLAGS=\"\$LLDP_CFLAGS \${ac_res}\""; } >&5
+  (: LLDP_CFLAGS="$LLDP_CFLAGS ${ac_res}") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+                      LLDP_CFLAGS="$LLDP_CFLAGS ${ac_res}"
+   fi
+ ;;
+esac
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for gcc 
-Wfatal-errors" >&5
 $as_echo_n "checking CFLAGS for gcc -Wfatal-errors... " >&6; }
 if ${ac_cv_cflags_gcc_option__Wfatal_errors+:} false; then :
@@ -17372,6 +17436,70 @@
  ;;
 esac
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for gcc 
-fstack-clash-protection" >&5
+$as_echo_n "checking CFLAGS for gcc -fstack-clash-protection... " >&6; }
+if ${ac_cv_cflags_gcc_option__fstack_clash_protection+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_cflags_gcc_option__fstack_clash_protection="no, unknown"
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext 
$LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_save_CFLAGS="$CFLAGS"
+for ac_arg in "-pedantic -Werror % -fstack-clash-protection"     "-pedantic % 
-fstack-clash-protection %% no, obsolete"     #
+do CFLAGS="$ac_save_CFLAGS $LLDP_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 
's,%,,'`
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_cflags_gcc_option__fstack_clash_protection=`echo $ac_arg | sed -e 
's,.*% *,,'` ; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+ CFLAGS="$ac_save_CFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext 
$LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$ac_cv_cflags_gcc_option__fstack_clash_protection" >&5
+$as_echo "$ac_cv_cflags_gcc_option__fstack_clash_protection" >&6; }
+ac_res=$ac_cv_cflags_gcc_option__fstack_clash_protection
+case ".${ac_res}" in
+     .ok|.ok,*)  ;;
+   .|.no|.no,*)  ;;
+   *)
+   if echo " $LLDP_CFLAGS " | grep " ${ac_res} " 2>&1 >/dev/null
+   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : LLDP_CFLAGS does contain 
\${ac_res}"; } >&5
+  (: LLDP_CFLAGS does contain ${ac_res}) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : 
LLDP_CFLAGS=\"\$LLDP_CFLAGS \${ac_res}\""; } >&5
+  (: LLDP_CFLAGS="$LLDP_CFLAGS ${ac_res}") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+                      LLDP_CFLAGS="$LLDP_CFLAGS ${ac_res}"
+   fi
+ ;;
+esac
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for gcc 
-D_FORTIFY_SOURCE=2" >&5
 $as_echo_n "checking CFLAGS for gcc -D_FORTIFY_SOURCE=2... " >&6; }
 if ${ac_cv_cflags_gcc_option__D_FORTIFY_SOURCE_2+:} false; then :
@@ -22934,7 +23062,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.3, which was
+This file was extended by lldpd $as_me 1.0.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23001,7 +23129,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.3
+lldpd config.status 1.0.4
 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.3/configure.ac new/lldpd-1.0.4/configure.ac
--- old/lldpd-1.0.3/configure.ac        2018-10-02 20:36:07.000000000 +0200
+++ new/lldpd-1.0.4/configure.ac        2019-03-17 16:24:10.000000000 +0100
@@ -76,6 +76,7 @@
 AX_CFLAGS_GCC_OPTION([-Wextra], [LLDP_CFLAGS])
 AX_CFLAGS_GCC_OPTION([-Wformat], [LLDP_CFLAGS])
 AX_CFLAGS_GCC_OPTION([-Wformat-security], [LLDP_CFLAGS])
+AX_CFLAGS_GCC_OPTION([-Wimplicit-fallthrough], [LLDP_CFLAGS])
 AX_CFLAGS_GCC_OPTION([-Wfatal-errors], [LLDP_CFLAGS])
 AX_CFLAGS_GCC_OPTION([-Wcast-align], [LLDP_CFLAGS])
 AX_CFLAGS_GCC_OPTION([-Wheader-guard], [LLDP_CFLAGS])
@@ -108,6 +109,7 @@
   AX_CFLAGS_GCC_OPTION([-fstack-protector-all], [LLDP_CFLAGS])
   AX_CFLAGS_GCC_OPTION([-fstack-protector-strong], [LLDP_CFLAGS])
   AX_CFLAGS_GCC_OPTION([-fstack-protector-strong], [LLDP_CFLAGS])
+  AX_CFLAGS_GCC_OPTION([-fstack-clash-protection], [LLDP_CFLAGS])
   AX_CFLAGS_GCC_OPTION([-D_FORTIFY_SOURCE=2], [LLDP_CPPFLAGS])
 fi
 if test x"$pie" = x"yes"; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/client/commands.c 
new/lldpd-1.0.4/src/client/commands.c
--- old/lldpd-1.0.3/src/client/commands.c       2017-01-16 08:23:42.000000000 
+0100
+++ new/lldpd-1.0.4/src/client/commands.c       2019-05-04 10:56:21.000000000 
+0200
@@ -504,7 +504,7 @@
                                        if (!complete) {
                                                snprintf(fmt, sizeof(fmt),
                                                    "%s%%%ds%s  %%s\n",
-                                                   "\033[1;30m", (int)maxl, 
"\033[0m");
+                                                   "\033[1m", (int)maxl, 
"\033[0m");
                                                fprintf(stderr, fmt,
                                                    cword->word ? cword->word : 
"WORD",
                                                    cword->doc ?  cword->doc  : 
"...");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/client/conf-system.c 
new/lldpd-1.0.4/src/client/conf-system.c
--- old/lldpd-1.0.3/src/client/conf-system.c    2018-03-17 17:07:11.000000000 
+0100
+++ new/lldpd-1.0.4/src/client/conf-system.c    2019-04-06 17:03:01.000000000 
+0200
@@ -298,6 +298,30 @@
        return 1;
 }
 
+static int
+cmd_maxneighs(struct lldpctl_conn_t *conn, struct writer *w,
+    struct cmd_env *env, void *arg)
+{
+       log_debug("lldpctl", "set maximum neighbors");
+
+       lldpctl_atom_t *config = lldpctl_get_configuration(conn);
+       if (config == NULL) {
+               log_warnx("lldpctl", "unable to get configuration from lldpd. 
%s",
+                   lldpctl_last_strerror(conn));
+               return 0;
+       }
+       if (lldpctl_atom_set_str(config,
+               lldpctl_k_config_max_neighbors, cmdenv_get(env, 
"max-neighbors")) == NULL) {
+               log_warnx("lldpctl", "unable to set maximum of neighbors. %s",
+                   lldpctl_last_strerror(conn));
+               lldpctl_atom_dec_ref(config);
+               return 0;
+       }
+       log_info("lldpctl", "maximum neighbors set to new value %s", 
cmdenv_get(env, "max-neighbors"));
+       lldpctl_atom_dec_ref(config);
+       return 1;
+}
+
 /**
  * Register `configure system bond-slave-src-mac-type`
  */
@@ -440,6 +464,16 @@
                NEWLINE, "Don't override system name",
                NULL, cmd_hostname, NULL);
 
+        commands_new(
+               commands_new(
+                       commands_new(configure_system,
+                           "max-neighbors", "Set maximum number of neighbors 
per port",
+                           cmd_check_no_env, NULL, "ports"),
+                       NULL, "Maximum number of neighbors",
+                       NULL, cmd_store_env_value, "max-neighbors"),
+               NEWLINE, "Set maximum number of neighbors per port",
+               NULL, cmd_maxneighs, NULL);
+
        commands_new(
                commands_new(
                        commands_new(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/client/display.c 
new/lldpd-1.0.4/src/client/display.c
--- old/lldpd-1.0.3/src/client/display.c        2018-03-17 17:07:11.000000000 
+0100
+++ new/lldpd-1.0.4/src/client/display.c        2019-04-06 17:03:01.000000000 
+0200
@@ -886,6 +886,8 @@
            lldpctl_atom_get_str(configuration, lldpctl_k_config_tx_interval));
        tag_datatag(w, "tx-hold", "Transmit hold",
            lldpctl_atom_get_str(configuration, lldpctl_k_config_tx_hold));
+       tag_datatag(w, "max-neighbors", "Maximum number of neighbors",
+           lldpctl_atom_get_str(configuration, 
lldpctl_k_config_max_neighbors));
        tag_datatag(w, "rx-only", "Receive mode",
            lldpctl_atom_get_int(configuration, lldpctl_k_config_receiveonly)?
            "yes":"no");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/client/lldpcli.8.in 
new/lldpd-1.0.4/src/client/lldpcli.8.in
--- old/lldpd-1.0.3/src/client/lldpcli.8.in     2018-03-17 17:07:11.000000000 
+0100
+++ new/lldpd-1.0.4/src/client/lldpcli.8.in     2019-04-06 17:03:01.000000000 
+0200
@@ -434,6 +434,14 @@
 .Ed
 
 .Cd configure
+.Cd system max-neighbors Ar neighbors
+.Bd -ragged -offset XXXXXX
+Change the maximum number of neighbors accepted (for each protocol) on
+an interface. This is a global value. The default is 32. This setting
+only applies to future neighbors.
+.Ed
+
+.Cd configure
 .Cd lldp agent-type
 .Cd nearest-bridge | nearest-non-tpmr-bridge | nearest-customer-bridge
 .Bd -ragged -offset XXXXXX
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/daemon/agent.c 
new/lldpd-1.0.4/src/daemon/agent.c
--- old/lldpd-1.0.3/src/daemon/agent.c  2018-10-02 20:36:20.000000000 +0200
+++ new/lldpd-1.0.4/src/daemon/agent.c  2019-06-08 16:49:52.000000000 +0200
@@ -295,6 +295,40 @@
        return header_index_best();
 }
 
+#ifdef ENABLE_CUSTOM
+static struct lldpd_custom*
+header_tprcustomindexed_table(struct variable *vp, oid *name, size_t *length,
+    int exact, size_t *var_len, WriteMethod **write_method)
+{
+       struct lldpd_hardware *hardware;
+       struct lldpd_port *port;
+       struct lldpd_custom *custom;
+       oid index[8];
+       oid idx;
+
+       if (!header_index_init(vp, name, length, exact, var_len, write_method)) 
return NULL;
+       TAILQ_FOREACH(hardware, &scfg->g_hardware, h_entries) {
+               TAILQ_FOREACH(port, &hardware->h_rports, p_entries) {
+                       if (SMART_HIDDEN(port)) continue;
+                       idx = 1;
+                       TAILQ_FOREACH(custom, &port->p_custom_list, next) {
+                               index[0] = lastchange(port);
+                               index[1] = hardware->h_ifindex;
+                               index[2] = port->p_chassis->c_index;
+                               index[3] = custom->oui[0];
+                               index[4] = custom->oui[1];
+                               index[5] = custom->oui[2];
+                               index[6] = custom->subtype;
+                               index[7] = idx++;
+                               if (header_index_add(index, 8, custom))
+                                       return custom;
+                       }
+               }
+       }
+       return header_index_best();
+}
+#endif
+
 #ifdef ENABLE_LLDPMED
 #define TPR_VARIANT_MED_POLICY 2
 #define TPR_VARIANT_MED_LOCATION 3
@@ -552,6 +586,8 @@
 #define LLDP_SNMP_ADDR_IFSUBTYPE 2
 #define LLDP_SNMP_ADDR_IFID 3
 #define LLDP_SNMP_ADDR_OID 4
+/* Custom TLVs */
+#define LLDP_SNMP_ORG_DEF_INFO 1
 /* LLDP-MED */
 #define LLDP_SNMP_MED_CAP_AVAILABLE 1
 #define LLDP_SNMP_MED_CAP_ENABLED 2
@@ -1407,6 +1443,33 @@
         return agent_v_management(vp, var_len, mgmt);
 }
 
+#ifdef ENABLE_CUSTOM
+static u_char*
+agent_v_custom(struct variable *vp, size_t *var_len, struct lldpd_custom 
*custom)
+{
+       switch (vp->magic) {
+        case LLDP_SNMP_ORG_DEF_INFO:
+               *var_len = custom->oui_info_len;
+               return (u_char *)custom->oui_info;
+       default:
+               break;
+        }
+        return NULL;
+}
+static u_char*
+agent_h_remote_custom(struct variable *vp, oid *name, size_t *length,
+    int exact, size_t *var_len, WriteMethod **write_method)
+{
+       struct lldpd_custom *custom;
+
+       if ((custom = header_tprcustomindexed_table(vp, name, length,
+                   exact, var_len, write_method)) == NULL)
+               return NULL;
+
+        return agent_v_custom(vp, var_len, custom);
+}
+#endif
+
 /*
   Here is how it works: a agent_h_*() function will handle incoming
   requests. It will use an appropriate header_*indexed_table()
@@ -1477,8 +1540,13 @@
          {1, 4, 2, 1, 4}},
         {LLDP_SNMP_ADDR_OID, ASN_OBJECT_ID, RONLY, agent_h_remote_management, 
5,
          {1, 4, 2, 1, 5}},
-       /* Dot3, local ports */
+#ifdef ENABLE_CUSTOM
+       /* Custom TLVs */
+       {LLDP_SNMP_ORG_DEF_INFO, ASN_OCTET_STR, RONLY, agent_h_remote_custom, 5,
+        {1, 4, 4, 1, 4}},
+#endif
 #ifdef ENABLE_DOT3
+       /* Dot3, local ports */
         {LLDP_SNMP_DOT3_AUTONEG_SUPPORT, ASN_INTEGER, RONLY, 
agent_h_local_port, 8,
          {1, 5, 4623, 1, 2, 1, 1, 1}},
         {LLDP_SNMP_DOT3_AUTONEG_ENABLED, ASN_INTEGER, RONLY, 
agent_h_local_port, 8,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/daemon/client.c 
new/lldpd-1.0.4/src/daemon/client.c
--- old/lldpd-1.0.3/src/daemon/client.c 2018-08-08 22:45:27.000000000 +0200
+++ new/lldpd-1.0.4/src/daemon/client.c 2019-04-06 17:03:01.000000000 +0200
@@ -87,6 +87,11 @@
                cfg->g_config.c_ttl = cfg->g_config.c_tx_interval *
                    cfg->g_config.c_tx_hold;
        }
+       if (CHANGED(c_max_neighbors) && config->c_max_neighbors > 0) {
+               log_debug("rpc", "client change maximum neighbors to %d",
+                   config->c_max_neighbors);
+               cfg->g_config.c_max_neighbors = config->c_max_neighbors;
+       }
        if (CHANGED(c_lldp_portid_type) &&
            config->c_lldp_portid_type > LLDP_PORTID_SUBTYPE_UNKNOWN &&
            config->c_lldp_portid_type <= LLDP_PORTID_SUBTYPE_MAX) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/daemon/event.c 
new/lldpd-1.0.4/src/daemon/event.c
--- old/lldpd-1.0.3/src/daemon/event.c  2017-02-19 14:00:06.000000000 +0100
+++ new/lldpd-1.0.4/src/daemon/event.c  2019-06-12 21:51:07.000000000 +0200
@@ -756,8 +756,7 @@
 {
        log_debug("event", "subscribe to interface changes from socket %d",
            socket);
-       if (cfg->g_iface_cb == NULL)
-               levent_make_socket_nonblocking(socket);
+       levent_make_socket_nonblocking(socket);
        cfg->g_iface_event = event_new(cfg->g_base, socket,
            EV_READ | EV_PERSIST, levent_iface_recv, cfg);
        if (cfg->g_iface_event == NULL) {
@@ -914,3 +913,29 @@
        }
        return 0;
 }
+
+#ifdef HOST_OS_LINUX
+/* Receive and log error from a socket when there is suspicion of an error. */
+void
+levent_recv_error(int fd, const char *source)
+{
+       do {
+               ssize_t n;
+               char buf[1024] = {};
+               struct msghdr msg = {
+                       .msg_control = buf,
+                       .msg_controllen = sizeof(buf)
+               };
+               if ((n = recvmsg(fd, &msg, MSG_ERRQUEUE | MSG_DONTWAIT)) <= 0) {
+                       return;
+               }
+               struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg);
+               if (cmsg == NULL)
+                       log_warnx("event", "received unknown error on %s",
+                           source);
+               else
+                       log_warnx("event", "received error (level=%d/type=%d) 
on %s",
+                           cmsg->cmsg_level, cmsg->cmsg_type, source);
+       } while (1);
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/daemon/interfaces-linux.c 
new/lldpd-1.0.4/src/daemon/interfaces-linux.c
--- old/lldpd-1.0.3/src/daemon/interfaces-linux.c       2018-11-30 
22:37:06.000000000 +0100
+++ new/lldpd-1.0.4/src/daemon/interfaces-linux.c       2019-06-12 
21:51:07.000000000 +0200
@@ -71,29 +71,6 @@
            buffer, size);
 }
 
-static void
-iflinux_error_recv(struct lldpd_hardware *hardware, int fd)
-{
-       do {
-               ssize_t n;
-               char buf[1024] = {};
-               struct msghdr msg = {
-                       .msg_control = buf,
-                       .msg_controllen = sizeof(buf)
-               };
-               if ((n = recvmsg(fd, &msg, MSG_ERRQUEUE)) <= 0) {
-                       return;
-               }
-               struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg);
-               if (cmsg == NULL)
-                       log_warnx("interfaces", "received unknown error on %s",
-                           hardware->h_ifname);
-               else
-                       log_warnx("interfaces", "received error 
(level=%d/type=%d) on %s",
-                           cmsg->cmsg_level, cmsg->cmsg_type, 
hardware->h_ifname);
-       } while (1);
-}
-
 static int
 iflinux_generic_recv(struct lldpd_hardware *hardware,
     int fd, char *buffer, size_t size,
@@ -110,7 +87,7 @@
                    &fromlen)) == -1) {
                if (errno == EAGAIN && retry == 0) {
                        /* There may be an error queued in the socket. Clear it 
and retry. */
-                       iflinux_error_recv(hardware, fd);
+                       levent_recv_error(fd, hardware->h_ifname);
                        retry++;
                        goto retry;
                }
@@ -994,7 +971,7 @@
                }
 
                /* If the interface is linked to another one, skip it too. */
-               if (iface->lower && (!iface->driver || strcmp(iface->driver, 
"veth"))) {
+               if (iface->lower && (!iface->driver || (strcmp(iface->driver, 
"veth") && strcmp(iface->driver, "dsa")))) {
                        log_debug("interfaces", "skip %s: there is a lower 
interface (%s)",
                            iface->name, iface->lower->name);
                        continue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/daemon/lldpd.8.in 
new/lldpd-1.0.4/src/daemon/lldpd.8.in
--- old/lldpd-1.0.3/src/daemon/lldpd.8.in       2017-08-29 20:19:40.000000000 
+0200
+++ new/lldpd-1.0.4/src/daemon/lldpd.8.in       2019-06-12 22:10:49.000000000 
+0200
@@ -243,15 +243,21 @@
 .Em !* ) ,
 the system name is used as a chassis ID instead.
 .It Fl M Ar class
-Enable emission of LLDP-MED frame. The class should be one of the
-following value:
+Enable emission of LLDP-MED frame. Depending on the selected class,
+the standard defines which set of TLV should be transmitted. See
+section 10.2.1. Some devices may be strict about this aspect. The
+class should be one of the following value:
 .Bl -tag -width "0:XX" -compact
 .It Sy 1
 Generic Endpoint (Class I)
 .It Sy 2
-Media Endpoint (Class II)
+Media Endpoint (Class II). In this case, the standard requires to
+define at least one network policy through
+.Nm lldpcli .
 .It Sy 3
-Communication Device Endpoints (Class III)
+Communication Device Endpoints (Class III). In this case, the standard
+requires to define at least one network policy through
+.Nm lldpcli .
 .It Sy 4
 Network Connectivity Device
 .El
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/daemon/lldpd.h 
new/lldpd-1.0.4/src/daemon/lldpd.h
--- old/lldpd-1.0.3/src/daemon/lldpd.h  2018-12-01 10:47:34.000000000 +0100
+++ new/lldpd-1.0.4/src/daemon/lldpd.h  2019-06-12 21:51:07.000000000 +0200
@@ -127,6 +127,9 @@
 void    levent_schedule_cleanup(struct lldpd *);
 int     levent_make_socket_nonblocking(int);
 int     levent_make_socket_blocking(int);
+#ifdef HOST_OS_LINUX
+void    levent_recv_error(int, const char*);
+#endif
 
 /* lldp.c */
 int     lldp_send_shutdown(PROTO_SEND_SIG);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/daemon/netlink.c 
new/lldpd-1.0.4/src/daemon/netlink.c
--- old/lldpd-1.0.3/src/daemon/netlink.c        2018-11-07 20:19:58.000000000 
+0100
+++ new/lldpd-1.0.4/src/daemon/netlink.c        2019-06-12 21:51:07.000000000 
+0200
@@ -442,8 +442,7 @@
     struct interfaces_device_list *ifs,
     struct interfaces_address_list *ifas)
 {
-       int end = 0, ret = 0;
-       int flags = MSG_PEEK | MSG_TRUNC;
+       int end = 0, ret = 0, flags, retry = 0;
        struct iovec iov;
        int link_update = 0;
        int s = cfg->g_netlink->nl_socket;
@@ -471,12 +470,16 @@
                        .msg_name = &peer,
                        .msg_namelen = sizeof(struct sockaddr_nl)
                };
-
+               flags = MSG_PEEK | MSG_TRUNC;
 retry:
                len = recvmsg(s, &rtnl_reply, flags);
                if (len == -1) {
                        if (errno == EAGAIN || errno == EWOULDBLOCK) {
-                               log_debug("netlink", "should have received 
something, but didn't");
+                               if (retry++ == 0) {
+                                       levent_recv_error(s, "netlink socket");
+                                       goto retry;
+                               }
+                               log_warnx("netlink", "should have received 
something, but didn't");
                                ret = 0;
                                goto out;
                        }
@@ -650,7 +653,6 @@
                                    msg->nlmsg_type, msg->nlmsg_len);
                        }
                }
-               flags = MSG_PEEK | MSG_TRUNC;
        }
 end:
        if (link_update) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/daemon/priv-seccomp.c 
new/lldpd-1.0.4/src/daemon/priv-seccomp.c
--- old/lldpd-1.0.3/src/daemon/priv-seccomp.c   2017-11-16 18:42:15.000000000 
+0100
+++ new/lldpd-1.0.4/src/daemon/priv-seccomp.c   2018-12-10 17:21:35.000000000 
+0100
@@ -149,6 +149,7 @@
            (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 0)) < 
0 || /* write needed for */
            (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(open), 0)) < 0 
||
            (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(openat), 0)) < 
0 ||
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(lseek), 0)) < 
0 ||
            (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(fcntl), 0)) < 
0 ||
            (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(kill), 0)) < 0 
||
            (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(socket), 0)) < 
0 ||
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/daemon/priv.c 
new/lldpd-1.0.4/src/daemon/priv.c
--- old/lldpd-1.0.3/src/daemon/priv.c   2018-12-10 14:51:55.000000000 +0100
+++ new/lldpd-1.0.4/src/daemon/priv.c   2019-04-06 17:03:01.000000000 +0200
@@ -27,6 +27,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <errno.h>
+#include <limits.h>
 #include <sys/wait.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/daemon/protocols/lldp.c 
new/lldpd-1.0.4/src/daemon/protocols/lldp.c
--- old/lldpd-1.0.3/src/daemon/protocols/lldp.c 2018-10-02 20:36:20.000000000 
+0200
+++ new/lldpd-1.0.4/src/daemon/protocols/lldp.c 2019-04-06 21:17:16.000000000 
+0200
@@ -1147,6 +1147,7 @@
                default:
                        log_warnx("lldp", "unknown tlv (%d) received on %s",
                            tlv_type, hardware->h_ifname);
+                       hardware->h_rx_unrecognized_cnt++;
                        goto malformed;
                }
                if (pos > tlv + tlv_size) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/lib/atoms/config.c 
new/lldpd-1.0.4/src/lib/atoms/config.c
--- old/lldpd-1.0.3/src/lib/atoms/config.c      2018-03-17 17:07:11.000000000 
+0100
+++ new/lldpd-1.0.4/src/lib/atoms/config.c      2019-04-06 17:03:01.000000000 
+0200
@@ -244,6 +244,8 @@
 #endif
        case lldpctl_k_config_tx_hold:
                return c->config->c_tx_hold;
+       case lldpctl_k_config_max_neighbors:
+               return c->config->c_max_neighbors;
        default:
                return SET_ERROR(atom->conn, LLDPCTL_ERR_NOT_EXIST);
        }
@@ -292,6 +294,10 @@
                config.c_tx_hold = value;
                if (value > 0) c->config->c_tx_hold = value;
                break;
+       case lldpctl_k_config_max_neighbors:
+               config.c_max_neighbors = value;
+               if (value > 0) c->config->c_max_neighbors = value;
+               break;
        case lldpctl_k_config_bond_slave_src_mac_type:
                config.c_bond_slave_src_mac_type = value;
                c->config->c_bond_slave_src_mac_type = value;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/lib/lldpctl.h 
new/lldpd-1.0.4/src/lib/lldpctl.h
--- old/lldpd-1.0.3/src/lib/lldpctl.h   2018-06-16 18:45:43.000000000 +0200
+++ new/lldpd-1.0.4/src/lib/lldpctl.h   2019-04-06 17:03:01.000000000 +0200
@@ -790,6 +790,7 @@
        lldpctl_k_config_bond_slave_src_mac_type, /**< `(I,WO)` bond slave src 
mac type. */
        lldpctl_k_config_lldp_portid_type, /**< `(I,WO)` LLDP PortID TLV 
Subtype */
        lldpctl_k_config_lldp_agent_type, /**< `(I,WO)` LLDP agent type */
+       lldpctl_k_config_max_neighbors, /**< `(I,WO)`Maximum number of 
neighbors per port. */
 
        lldpctl_k_custom_tlvs = 5000,           /**< `(AL)` custom TLVs */
        lldpctl_k_custom_tlvs_clear,            /** `(I,WO)` clear list of 
custom TLVs */
@@ -1035,10 +1036,10 @@
  * reference count of the provided value is decremented. If you need to use it
  * outside of the loop, you need to increment it.
  */
-#define lldpctl_atom_foreach(atom, value)                              \
-       for (lldpctl_atom_iter_t *iter = lldpctl_atom_iter(atom);       \
-            iter && (value = lldpctl_atom_iter_value(atom, iter));     \
-            iter = lldpctl_atom_iter_next(atom, iter),                 \
+#define lldpctl_atom_foreach(atom, value)                                      
        \
+       for (lldpctl_atom_iter_t *iter##_LINE_ = lldpctl_atom_iter(atom);       
        \
+            iter##_LINE_ && (value = lldpctl_atom_iter_value(atom, 
iter##_LINE_));     \
+            iter##_LINE_ = lldpctl_atom_iter_next(atom, iter##_LINE_),         
        \
                 lldpctl_atom_dec_ref(value))
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/lldpd-structs.c 
new/lldpd-1.0.4/src/lldpd-structs.c
--- old/lldpd-1.0.3/src/lldpd-structs.c 2018-03-17 17:07:11.000000000 +0100
+++ new/lldpd-1.0.4/src/lldpd-structs.c 2019-04-09 09:01:16.000000000 +0200
@@ -175,7 +175,7 @@
                del = all;
                if (!all && expire &&
                    (now >= port->p_lastupdate + port->p_ttl)) {
-                       hardware->h_ageout_cnt++;
+                       if (port->p_ttl > 0) hardware->h_ageout_cnt++;
                        del = 1;
                }
                if (del) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/src/lldpd-structs.h 
new/lldpd-1.0.4/src/lldpd-structs.h
--- old/lldpd-1.0.3/src/lldpd-structs.h 2018-10-02 21:11:41.000000000 +0200
+++ new/lldpd-1.0.4/src/lldpd-structs.h 2019-01-10 15:05:14.000000000 +0100
@@ -129,7 +129,7 @@
 MARSHAL(lldpd_dot3_power);
 #endif
 
-#ifdef ENABLE_CDP
+#if defined (ENABLE_CDP) || defined (ENABLE_FDP)
 struct cdpv2_power {
        u_int16_t request_id;
        u_int16_t management_id;
@@ -273,7 +273,7 @@
        struct lldpd_med_power   p_med_power;
 #endif
 
-#ifdef ENABLE_CDP
+#if defined (ENABLE_CDP) || defined (ENABLE_FDP)
        struct cdpv2_power p_cdp_power;
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.3/tests/check_snmp.c 
new/lldpd-1.0.4/tests/check_snmp.c
--- old/lldpd-1.0.3/tests/check_snmp.c  2017-02-19 14:00:06.000000000 +0100
+++ new/lldpd-1.0.4/tests/check_snmp.c  2019-06-08 16:49:52.000000000 +0200
@@ -246,10 +246,38 @@
                                .data_len = 15,
                        }, { .format = 0 }, { .format = 0 },
                },
-#endif         
+#endif
        }
 };
 
+#ifdef ENABLE_CUSTOM
+struct lldpd_custom custom1 = {
+       .oui = { 33, 44, 55 },
+       .subtype = 44,
+       .oui_info = (u_int8_t*)"OUI content",
+};
+struct lldpd_custom custom2 = {
+       .oui = { 33, 44, 55 },
+       .subtype = 44,
+       .oui_info = (u_int8_t*)"More content",
+};
+struct lldpd_custom custom3 = {
+       .oui = { 33, 44, 55 },
+       .subtype = 45,
+       .oui_info = (u_int8_t*)"More more content",
+};
+struct lldpd_custom custom4 = {
+       .oui = { 33, 44, 56 },
+       .subtype = 44,
+       .oui_info = (u_int8_t*)"Even more content",
+};
+struct lldpd_custom custom5 = {
+       .oui = { 33, 44, 55 },
+       .subtype = 44,
+       .oui_info = (u_int8_t*)"Still more content",
+};
+#endif
+
 #ifdef ENABLE_DOT1
 struct lldpd_vlan vlan47 = {
        .v_name = "VLAN #47",
@@ -308,6 +336,21 @@
        TAILQ_INIT(&test_cfg.g_hardware);
        TAILQ_INSERT_TAIL(&test_cfg.g_hardware, &hardware1, h_entries);
        TAILQ_INSERT_TAIL(&test_cfg.g_hardware, &hardware2, h_entries);
+#ifdef ENABLE_CUSTOM
+       custom1.oui_info_len = strlen((char*)custom1.oui_info);
+       custom2.oui_info_len = strlen((char*)custom2.oui_info);
+       custom3.oui_info_len = strlen((char*)custom3.oui_info);
+       custom4.oui_info_len = strlen((char*)custom4.oui_info);
+       custom5.oui_info_len = strlen((char*)custom5.oui_info);
+       TAILQ_INIT(&hardware1.h_lport.p_custom_list);
+       TAILQ_INIT(&hardware2.h_lport.p_custom_list);
+       TAILQ_INIT(&port2.p_custom_list);
+       TAILQ_INSERT_TAIL(&hardware2.h_lport.p_custom_list, &custom1, next);
+       TAILQ_INSERT_TAIL(&hardware2.h_lport.p_custom_list, &custom2, next);
+       TAILQ_INSERT_TAIL(&hardware2.h_lport.p_custom_list, &custom3, next);
+       TAILQ_INSERT_TAIL(&hardware2.h_lport.p_custom_list, &custom4, next);
+       TAILQ_INSERT_TAIL(&hardware1.h_lport.p_custom_list, &custom5, next);
+#endif
 #ifdef ENABLE_DOT1
        TAILQ_INIT(&hardware1.h_lport.p_vlans);
        TAILQ_INSERT_TAIL(&hardware1.h_lport.p_vlans, &vlan47, v_entries);
@@ -525,6 +568,20 @@
          { .string = { .octet = (char *)zeroDotZero,
                        .len = sizeof(zeroDotZero) }} },
 
+#ifdef ENABLE_CUSTOM
+       /* lldpRemOrgDefInfo */
+       { {1, 4, 4, 1, 4, 0, 3, 1, 33, 44, 55, 44, 1 }, 13, ASN_OCTET_STR,
+         { .string = { .octet = "OUI content", .len = 11 }} },
+       { {1, 4, 4, 1, 4, 0, 3, 1, 33, 44, 55, 44, 2 }, 13, ASN_OCTET_STR,
+         { .string = { .octet = "More content", .len = 12 }} },
+       { {1, 4, 4, 1, 4, 0, 3, 1, 33, 44, 55, 45, 3 }, 13, ASN_OCTET_STR,
+         { .string = { .octet = "More more content", .len = 17 }} },
+       { {1, 4, 4, 1, 4, 0, 3, 1, 33, 44, 56, 44, 4 }, 13, ASN_OCTET_STR,
+         { .string = { .octet = "Even more content", .len = 17 }} },
+       { {1, 4, 4, 1, 4, 10000, 4, 1, 33, 44, 55, 44, 1 }, 13, ASN_OCTET_STR,
+         { .string = { .octet = "Still more content", .len = 18 }} },
+#endif
+
 #ifdef ENABLE_DOT3
        /* lldpXdot3LocPortAutoNegSupported */
        { {1, 5, 4623, 1, 2, 1, 1, 1, 3 }, 9, ASN_INTEGER, { .integer = 1 }},


Reply via email to