Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lldpd for openSUSE:Factory checked 
in at 2022-08-30 14:50:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lldpd (Old)
 and      /work/SRC/openSUSE:Factory/.lldpd.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lldpd"

Tue Aug 30 14:50:41 2022 rev:23 rq:1000195 version:1.0.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/lldpd/lldpd.changes      2022-05-25 
20:35:46.788329586 +0200
+++ /work/SRC/openSUSE:Factory/.lldpd.new.2083/lldpd.changes    2022-08-30 
14:51:26.516420792 +0200
@@ -1,0 +2,8 @@
+Mon Aug 29 10:08:48 UTC 2022 - Jan Engelhardt <jeng...@inai.de>
+
+- Update to release 1.0.15
+  * protocol/lldp: accept unknown TLVs on known orgs
+  * client: Added support to override system capabilities
+  * netlink: ignore IPv6 temporary addresses
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ lldpd.spec ++++++
--- /var/tmp/diff_new_pack.I3xrpl/_old  2022-08-30 14:51:27.000422027 +0200
+++ /var/tmp/diff_new_pack.I3xrpl/_new  2022-08-30 14:51:27.008422047 +0200
@@ -26,7 +26,7 @@
   %define _fillupdir %{_localstatedir}/adm/fillup-templates
 %endif
 Name:           lldpd
-Version:        1.0.14
+Version:        1.0.15
 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.14.tar.gz -> lldpd-1.0.15.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/.dist-version 
new/lldpd-1.0.15/.dist-version
--- old/lldpd-1.0.14/.dist-version      2022-05-21 23:10:54.000000000 +0200
+++ new/lldpd-1.0.15/.dist-version      2022-08-17 15:09:38.000000000 +0200
@@ -1 +1 @@
-1.0.14
+1.0.15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/ChangeLog new/lldpd-1.0.15/ChangeLog
--- old/lldpd-1.0.14/ChangeLog  2022-05-21 23:10:53.000000000 +0200
+++ new/lldpd-1.0.15/ChangeLog  2022-08-17 15:09:37.000000000 +0200
@@ -1,3 +1,21 @@
+1.0.15 [2022-08-17 15:07:26 +0200]:
+
+ - [4489027c47f6] release: 1.0.15 (Vincent Bernat)
+ - [09b95cb62f56] protocol/lldp: accept unknown TLVs on known orgs (Vincent 
Bernat)
+ - [2541f5c05712] client: make a connection before parsing inputs (Vincent 
Bernat)
+ - [548719bfa36c] doc: mention contributor of last commit (Vincent Bernat)
+ - [4c8e6e37142b] client: Added support to override system capabilities 
(Ignacio Sanchez Navarro)
+ - [31c49c1593bf] build: update flake.lock (Vincent Bernat)
+ - [3161d66bb804] github: only build tags, master branch and pull requests 
(Vincent Bernat)
+ - [23fc28d5cb99] github: revert last change (Vincent Bernat)
+ - [72bbcbd98dae] github: show how to use triple backticks (Vincent Bernat)
+ - [eacd9512ebd2] netlink: fix indentation (Vincent Bernat)
+ - [db5c70856ad5] netlink: ignore IPv6 temporary addresses (Vincent Bernat)
+ - [a8bd66c87dd8] tests: really fix "too many VLANs" test (Vincent Bernat)
+ - [4900429110b0] doc: add an entry for latest commit (Vincent Bernat)
+ - [1f5bc03e4d02] lldp: don't send vlan when without_vlans is set (Florent 
Fourcot)
+ - [a3e1f7f51a20] debian: update debhelper to 9 (Vincent Bernat)
+
 1.0.14 [2022-05-21 23:07:48 +0200]:
 
  - [15b9de1227c9] release: 1.0.14 (Vincent Bernat)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/NEWS new/lldpd-1.0.15/NEWS
--- old/lldpd-1.0.14/NEWS       2022-05-15 11:56:49.000000000 +0200
+++ new/lldpd-1.0.15/NEWS       2022-08-16 19:05:44.000000000 +0200
@@ -1,3 +1,12 @@
+lldpd (1.0.15)
+ * Changes
+   + Add configure command to override system capabilities. Contributed by
+     Ignacio Sanchez Navarro. (#526)
+   + An unrecognized ORG TLV is now considered as a custom one. (#536)
+ * Fix:
+   + Really don't send VLANs when there are too many (#520)
+   + Ignore temporary IPv6 addresses (#521)
+
 lldpd (1.0.14)
  * Changes
    + Add configure commands to alter inventory TLVs (#508)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/configure new/lldpd-1.0.15/configure
--- old/lldpd-1.0.14/configure  2022-05-21 23:10:34.000000000 +0200
+++ new/lldpd-1.0.15/configure  2022-08-17 15:08:06.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for lldpd 1.0.14.
+# Generated by GNU Autoconf 2.71 for lldpd 1.0.15.
 #
 # Report bugs to <https://github.com/lldpd/lldpd/issues>.
 #
@@ -621,8 +621,8 @@
 # Identity of this package.
 PACKAGE_NAME='lldpd'
 PACKAGE_TARNAME='lldpd'
-PACKAGE_VERSION='1.0.14'
-PACKAGE_STRING='lldpd 1.0.14'
+PACKAGE_VERSION='1.0.15'
+PACKAGE_STRING='lldpd 1.0.15'
 PACKAGE_BUGREPORT='https://github.com/lldpd/lldpd/issues'
 PACKAGE_URL='https://lldpd.github.io/'
 
@@ -1547,7 +1547,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.14 to adapt to many kinds of systems.
+\`configure' configures lldpd 1.0.15 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1618,7 +1618,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of lldpd 1.0.14:";;
+     short | recursive ) echo "Configuration of lldpd 1.0.15:";;
    esac
   cat <<\_ACEOF
 
@@ -1836,7 +1836,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-lldpd configure 1.0.14
+lldpd configure 1.0.15
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2252,7 +2252,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.14, which was
+It was created by lldpd $as_me 1.0.15, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3535,7 +3535,7 @@
 
 # Define the identity of the package.
  PACKAGE='lldpd'
- VERSION='1.0.14'
+ VERSION='1.0.15'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -24386,7 +24386,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.14, which was
+This file was extended by lldpd $as_me 1.0.15, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -24455,7 +24455,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-lldpd config.status 1.0.14
+lldpd config.status 1.0.15
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/client/conf-system.c 
new/lldpd-1.0.15/src/client/conf-system.c
--- old/lldpd-1.0.14/src/client/conf-system.c   2021-08-25 08:38:49.000000000 
+0200
+++ new/lldpd-1.0.15/src/client/conf-system.c   2022-08-11 12:34:21.000000000 
+0200
@@ -228,6 +228,87 @@
 }
 
 static int
+cmd_capability(struct lldpctl_conn_t *conn, struct writer *w,
+    struct cmd_env *env, void *arg)
+{
+       log_debug("lldpctl", "set capabilities");
+
+       int ret = 0;
+       lldpctl_atom_t *config = lldpctl_get_configuration(conn);
+       lldpctl_atom_t *chassis = NULL;
+       if (config == NULL) {
+               log_warnx("lldpctl", "unable to get configuration from lldpd. 
%s",
+                   lldpctl_last_strerror(conn));
+               goto cmd_capability_end;
+       }
+
+       if (!strcmp(arg, "configure")) {
+
+               const char *s = cmdenv_get(env, "capabilities");
+               if (s) {
+                       chassis = lldpctl_get_local_chassis(conn);
+                       if (chassis == NULL) {
+                               log_warnx("lldpctl", "unable to get local 
chassis from lldpd. %s",
+                                   lldpctl_last_strerror(conn));
+                               goto cmd_capability_end;
+                       }
+                       u_int16_t value = 0;
+                       const char delim[] = ",";
+                       char *s_copy = strdup(s);
+                       char *token = strtok(s_copy, delim);
+                       while (token != NULL) {
+                               if (!strcmp(token, "other")) {
+                                       value |= LLDP_CAP_OTHER;
+                               } else if (!strcmp(token, "repeater")) {
+                                       value |= LLDP_CAP_REPEATER;
+                               } else if (!strcmp(token, "bridge")) {
+                                       value |= LLDP_CAP_BRIDGE;
+                               } else if (!strcmp(token, "wlan")) {
+                                       value |= LLDP_CAP_WLAN;
+                               } else if (!strcmp(token, "router")) {
+                                       value |= LLDP_CAP_ROUTER;
+                               } else if (!strcmp(token, "telephone")) {
+                                       value |= LLDP_CAP_TELEPHONE;
+                               } else if (!strcmp(token, "docsis")) {
+                                       value |= LLDP_CAP_DOCSIS;
+                               } else if (!strcmp(token, "station")) {
+                                       value |= LLDP_CAP_STATION;
+                               } else {
+                                       log_warnx("lldpctl", "capability %s not 
found", token);
+                               }
+                               token = strtok(NULL, delim);
+                       }
+                       free(s_copy);
+
+                       if (lldpctl_atom_set_int(chassis, 
lldpctl_k_chassis_cap_enabled, value) == NULL) {
+                               log_warnx("lldpctl", "unable to set system 
capabilities. %s",
+                                   lldpctl_last_strerror(conn));
+                               goto cmd_capability_end;
+                       }
+                       if (lldpctl_atom_set_int(config, 
lldpctl_k_config_chassis_cap_override, 1) == NULL) {
+                               log_warnx("lldpctl", "unable to set system 
capabilities override. %s",
+                                   lldpctl_last_strerror(conn));
+                               goto cmd_capability_end;
+                       }
+                       log_debug("lldpctl", "system capabilities set to new 
value %d",
+                           value);
+               }
+       } else {
+               if (lldpctl_atom_set_int(config, 
lldpctl_k_config_chassis_cap_override, 0) == NULL) {
+                       log_warnx("lldpctl", "unable to set system capabilities 
to not override. %s",
+                           lldpctl_last_strerror(conn));
+                       goto cmd_capability_end;
+               }
+       }
+
+       ret = 1;
+ cmd_capability_end:
+       lldpctl_atom_dec_ref(chassis);
+       lldpctl_atom_dec_ref(config);
+       return ret;
+}
+
+static int
 cmd_update_descriptions(struct lldpctl_conn_t *conn, struct writer *w,
     struct cmd_env *env, void *arg)
 {
@@ -376,6 +457,38 @@
        }
 }
 
+static void
+register_commands_capabilities(struct cmd_node *configure, struct cmd_node 
*unconfigure)
+{
+       struct cmd_node *configure_capability = commands_new(
+           configure,
+           "capabilities", "Capabilities configuration",
+           cmd_check_no_env, NULL, "ports");
+       struct cmd_node *unconfigure_capability = commands_new(
+           unconfigure,
+           "capabilities", "Capabilities configuration",
+           cmd_check_no_env, NULL, "ports");
+
+       /* Override */
+       commands_new(
+           commands_new(
+           commands_new(configure_capability,
+           "enabled", "Override capabilities",
+           NULL, NULL, NULL),
+           NULL, " Set of capabilities separated by commas",
+           NULL, cmd_store_env_value, "capabilities"),
+           NEWLINE, "Override capabilities",
+           NULL, cmd_capability, "configure");
+
+       /* Do not override */
+       commands_new(
+           commands_new(unconfigure_capability,
+           "enabled", "Do not override capabilities",
+           NULL, NULL, NULL),
+           NEWLINE, "Do not override capabilities",
+           NULL, cmd_capability, "unconfigure");
+}
+
 /**
  * Register `configure system` commands.
  *
@@ -562,6 +675,7 @@
                NEWLINE, "Don't enable promiscuous mode on managed interfaces",
                NULL, cmd_iface_promisc, NULL);
 
+       register_commands_capabilities(configure_system, unconfigure_system);
        register_commands_srcmac_type(configure_system);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/client/display.c 
new/lldpd-1.0.15/src/client/display.c
--- old/lldpd-1.0.14/src/client/display.c       2021-08-25 08:38:49.000000000 
+0200
+++ new/lldpd-1.0.15/src/client/display.c       2022-08-11 12:34:21.000000000 
+0200
@@ -992,6 +992,9 @@
            N(lldpctl_atom_get_str(configuration, lldpctl_k_config_platform)));
        tag_datatag(w, "hostname", "Override system name with",
            N(lldpctl_atom_get_str(configuration, lldpctl_k_config_hostname)));
+       tag_datatag(w, "capabilities", "Override system capabilities",
+           lldpctl_atom_get_int(configuration, 
lldpctl_k_config_chassis_cap_override)?
+           "yes":"no");
        tag_datatag(w, "advertise-version", "Advertise version",
            lldpctl_atom_get_int(configuration, 
lldpctl_k_config_advertise_version)?
            "yes":"no");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/client/lldpcli.8.in 
new/lldpd-1.0.15/src/client/lldpcli.8.in
--- old/lldpd-1.0.14/src/client/lldpcli.8.in    2022-05-15 11:55:29.000000000 
+0200
+++ new/lldpd-1.0.15/src/client/lldpcli.8.in    2022-08-11 12:34:21.000000000 
+0200
@@ -268,6 +268,34 @@
 .Ed
 
 .Cd configure
+.Cd system capabilities enabled Ar capabilities
+.Bd -ragged -offset XXXXXX
+Override system capabilities with the provided value instead of using
+kernel information. Several capabilities can be specified separated by
+commas. Only available capabilities can be enabled. Valid capabilities are:
+.Bl -tag -width "XXX." -compact -offset XX
+.It Sy other
+.It Sy repeater
+.It Sy bridge
+.It Sy wlan
+.It Sy router
+.It Sy telephone
+.It Sy docsis
+.It Sy station
+.El
+Here is an example of use:
+.D1 configure system capabilities enabled bridge,router
+.Pp
+.Ed
+
+.Cd unconfigure
+.Cd system capabilities enabled
+.Bd -ragged -offset XXXXXX
+Do not override capabilities and use the kernel information. This option
+undoes the previous one.
+.Ed
+
+.Cd configure
 .Cd system interface pattern Ar pattern
 .Bd -ragged -offset XXXXXX
 Specify which interface to listen and send LLDPDU to. Without this
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/client/lldpcli.c 
new/lldpd-1.0.15/src/client/lldpcli.c
--- old/lldpd-1.0.14/src/client/lldpcli.c       2021-08-25 08:38:49.000000000 
+0200
+++ new/lldpd-1.0.15/src/client/lldpcli.c       2022-08-11 18:23:21.000000000 
+0200
@@ -431,6 +431,7 @@
        const char *fmt = "plain";
        lldpctl_conn_t *conn = NULL;
        const char *options = is_lldpctl(argv[0])?"hdvf:u:":"hdsvf:c:C:u:";
+       lldpctl_atom_t *configuration;
 
        int gotinputs = 0, version = 0;
        struct inputs inputs;
@@ -503,6 +504,13 @@
        conn = lldpctl_new_name(ctlname, NULL, NULL, NULL);
        if (conn == NULL) goto end;
 
+       /* Check we have a working connection */
+       if ((configuration = lldpctl_get_configuration(conn)) == NULL) {
+               /* ctl.c already outputs an error */
+               goto end;
+       }
+       lldpctl_atom_dec_ref(configuration);
+
        /* Process file inputs */
        while (gotinputs && !TAILQ_EMPTY(&inputs)) {
                /* coverity[use_after_free]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/daemon/client.c 
new/lldpd-1.0.15/src/daemon/client.c
--- old/lldpd-1.0.14/src/daemon/client.c        2022-05-15 11:55:29.000000000 
+0200
+++ new/lldpd-1.0.15/src/daemon/client.c        2022-08-11 12:34:21.000000000 
+0200
@@ -18,9 +18,7 @@
 #include "lldpd.h"
 #include "trace.h"
 
-#ifdef ENABLE_LLDPMED
 #include <sys/utsname.h>
-#endif
 
 static ssize_t
 client_handle_none(struct lldpd *cfg, enum hmsg_type *type,
@@ -207,6 +205,12 @@
                cfg->g_config.c_cap_advertise = config->c_cap_advertise;
                levent_update_now(cfg);
        }
+       if (CHANGED(c_cap_override)) {
+               log_debug("rpc", "%s chassis capabilities override",
+                   config->c_cap_override?"enable":"disable");
+               cfg->g_config.c_cap_override = config->c_cap_override;
+               levent_update_now(cfg);
+       }
        if (CHANGED(c_mgmt_advertise)) {
                log_debug("rpc", "%s management addresses advertisement",
                    config->c_mgmt_advertise?"enable":"disable");
@@ -277,9 +281,8 @@
        return output_len;
 }
 
-#ifdef ENABLE_LLDPMED
 /**
- * Set local chassis inventory info
+ * Set local chassis info
  * Input: chassis object
  * Output: updated chassis object
  */
@@ -289,7 +292,9 @@
 {
        struct lldpd_chassis *chassis = NULL;
        struct lldpd_chassis *local_chassis = NULL;
+#ifdef ENABLE_LLDPMED
        struct utsname un;
+#endif
 
        log_debug("rpc", "client request a change in chassis configuration");
        if (lldpd_chassis_unserialize(input, input_len, &chassis) <= 0) {
@@ -299,6 +304,7 @@
 
        local_chassis = LOCAL_CHASSIS(cfg);
 
+#ifdef ENABLE_LLDPMED
        free(local_chassis->c_med_hw);
        local_chassis->c_med_hw = (!chassis->c_med_hw) ? dmi_hw() : 
strdup(chassis->c_med_hw);
 
@@ -332,7 +338,14 @@
 
        free(local_chassis->c_med_asset);
        local_chassis->c_med_asset = (!chassis->c_med_asset) ? dmi_asset() : 
strdup(chassis->c_med_asset);
+#endif
+
+       if(chassis->c_cap_enabled != local_chassis->c_cap_enabled){
+               local_chassis->c_cap_enabled = chassis->c_cap_enabled;
+               log_debug("rpc", "change capabilities enabled to: %d", 
local_chassis->c_cap_enabled);
+       }
 
+#ifdef ENABLE_LLDPMED
        log_debug("rpc", "change hardware-revision to: %s", 
local_chassis->c_med_hw);
        log_debug("rpc", "change software-revision to: %s", 
local_chassis->c_med_sw);
        log_debug("rpc", "change firmware-revision to: %s", 
local_chassis->c_med_fw);
@@ -340,6 +353,7 @@
        log_debug("rpc", "change manufacturer to: %s", 
local_chassis->c_med_manuf);
        log_debug("rpc", "change model to: %s", local_chassis->c_med_model);
        log_debug("rpc", "change asset to: %s", local_chassis->c_med_asset);
+#endif
 
        lldpd_chassis_cleanup(chassis, 1);
 
@@ -351,7 +365,6 @@
 
        return output_len;
 }
-#endif /* ENABLE_LLDPMED */
 
 /* Return the local chassis.
    Input:  nothing.
@@ -652,9 +665,7 @@
        { GET_INTERFACES,       "Get interfaces",    
client_handle_get_interfaces },
        { GET_INTERFACE,        "Get interface",     
client_handle_get_interface },
        { GET_DEFAULT_PORT,     "Get default port",  
client_handle_get_default_port },
-#ifdef ENABLE_LLDPMED
        { SET_CHASSIS,          "Set local chassis", 
client_handle_set_local_chassis },
-#endif
        { GET_CHASSIS,          "Get local chassis", 
client_handle_get_local_chassis },
        { SET_PORT,             "Set port",          client_handle_set_port },
        { SUBSCRIBE,            "Subscribe",         client_handle_subscribe },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/daemon/interfaces.c 
new/lldpd-1.0.15/src/daemon/interfaces.c
--- old/lldpd-1.0.14/src/daemon/interfaces.c    2021-12-12 14:45:40.000000000 
+0100
+++ new/lldpd-1.0.15/src/daemon/interfaces.c    2022-08-11 12:34:21.000000000 
+0200
@@ -351,17 +351,19 @@
        struct lldpd_hardware *hardware;
        char *name = NULL;
 
-       LOCAL_CHASSIS(cfg)->c_cap_enabled &=
-                           ~(LLDP_CAP_BRIDGE | LLDP_CAP_WLAN | 
LLDP_CAP_STATION);
-       TAILQ_FOREACH(iface, interfaces, next) {
-               if (iface->type & IFACE_BRIDGE_T)
-                       LOCAL_CHASSIS(cfg)->c_cap_enabled |= LLDP_CAP_BRIDGE;
-               if (iface->type & IFACE_WIRELESS_T)
-                       LOCAL_CHASSIS(cfg)->c_cap_enabled |= LLDP_CAP_WLAN;
+       if (!cfg->g_config.c_cap_override) {
+               LOCAL_CHASSIS(cfg)->c_cap_enabled &=
+                   ~(LLDP_CAP_BRIDGE | LLDP_CAP_WLAN | LLDP_CAP_STATION);
+               TAILQ_FOREACH(iface, interfaces, next) {
+                       if (iface->type & IFACE_BRIDGE_T)
+                               LOCAL_CHASSIS(cfg)->c_cap_enabled |= 
LLDP_CAP_BRIDGE;
+                       if (iface->type & IFACE_WIRELESS_T)
+                               LOCAL_CHASSIS(cfg)->c_cap_enabled |= 
LLDP_CAP_WLAN;
+               }
+               if ((LOCAL_CHASSIS(cfg)->c_cap_available & LLDP_CAP_STATION) &&
+                   (LOCAL_CHASSIS(cfg)->c_cap_enabled == 0))
+                       LOCAL_CHASSIS(cfg)->c_cap_enabled = LLDP_CAP_STATION;
        }
-       if ((LOCAL_CHASSIS(cfg)->c_cap_available & LLDP_CAP_STATION) &&
-               (LOCAL_CHASSIS(cfg)->c_cap_enabled == 0))
-           LOCAL_CHASSIS(cfg)->c_cap_enabled = LLDP_CAP_STATION;
 
        /* Do not modify the chassis if it's already set to a MAC address or if
         * it's set to a local address equal to the user-provided
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/daemon/lldpd.c 
new/lldpd-1.0.15/src/daemon/lldpd.c
--- old/lldpd-1.0.14/src/daemon/lldpd.c 2022-05-15 11:55:29.000000000 +0200
+++ new/lldpd-1.0.15/src/daemon/lldpd.c 2022-08-11 12:34:21.000000000 +0200
@@ -1241,23 +1241,25 @@
        if (cfg->g_config.c_platform == NULL)
                cfg->g_config.c_platform = strdup(un.sysname);
 
-       /* Check routing */
-       if (lldpd_routing_enabled(cfg)) {
-               log_debug("localchassis", "routing is enabled, enable router 
capability");
-               LOCAL_CHASSIS(cfg)->c_cap_enabled |= LLDP_CAP_ROUTER;
-       } else
-               LOCAL_CHASSIS(cfg)->c_cap_enabled &= ~LLDP_CAP_ROUTER;
+       if (!cfg->g_config.c_cap_override) {
+               /* Check routing */
+               if (lldpd_routing_enabled(cfg)) {
+                       log_debug("localchassis", "routing is enabled, enable 
router capability");
+                       LOCAL_CHASSIS(cfg)->c_cap_enabled |= LLDP_CAP_ROUTER;
+               } else
+                       LOCAL_CHASSIS(cfg)->c_cap_enabled &= ~LLDP_CAP_ROUTER;
 
 #ifdef ENABLE_LLDPMED
-       if (LOCAL_CHASSIS(cfg)->c_cap_available & LLDP_CAP_TELEPHONE)
-               LOCAL_CHASSIS(cfg)->c_cap_enabled |= LLDP_CAP_TELEPHONE;
-       lldpd_med(cfg, &un);
-#endif
-       if ((LOCAL_CHASSIS(cfg)->c_cap_available & LLDP_CAP_STATION) &&
-               (LOCAL_CHASSIS(cfg)->c_cap_enabled == 0))
-               LOCAL_CHASSIS(cfg)->c_cap_enabled = LLDP_CAP_STATION;
-       else if (LOCAL_CHASSIS(cfg)->c_cap_enabled != LLDP_CAP_STATION)
-               LOCAL_CHASSIS(cfg)->c_cap_enabled &= ~LLDP_CAP_STATION;
+               if (LOCAL_CHASSIS(cfg)->c_cap_available & LLDP_CAP_TELEPHONE)
+                       LOCAL_CHASSIS(cfg)->c_cap_enabled |= LLDP_CAP_TELEPHONE;
+               lldpd_med(cfg, &un);
+#endif
+               if ((LOCAL_CHASSIS(cfg)->c_cap_available & LLDP_CAP_STATION) &&
+                   (LOCAL_CHASSIS(cfg)->c_cap_enabled == 0))
+                       LOCAL_CHASSIS(cfg)->c_cap_enabled = LLDP_CAP_STATION;
+               else if (LOCAL_CHASSIS(cfg)->c_cap_enabled != LLDP_CAP_STATION)
+                       LOCAL_CHASSIS(cfg)->c_cap_enabled &= ~LLDP_CAP_STATION;
+       }
 
        /* Set chassis ID if needed. This is only done if chassis ID
           has not been set previously (with the MAC address of an
@@ -1307,7 +1309,8 @@
           2. Update local chassis information
        */
        log_debug("loop", "start new loop");
-       LOCAL_CHASSIS(cfg)->c_cap_enabled = 0;
+       if(!cfg->g_config.c_cap_override)
+               LOCAL_CHASSIS(cfg)->c_cap_enabled = 0;
        /* Information for local ports is triggered even when it is possible to
         * update them on some other event because we want to refresh them if we
         * missed something. */
@@ -1941,6 +1944,7 @@
                calloc(1, sizeof(struct lldpd_chassis))) == NULL)
                fatal("localchassis", NULL);
        cfg->g_config.c_cap_advertise = 1;
+       cfg->g_config.c_cap_override = 0;
        lchassis->c_cap_available = LLDP_CAP_BRIDGE | LLDP_CAP_WLAN |
            LLDP_CAP_ROUTER | LLDP_CAP_STATION;
        cfg->g_config.c_mgmt_advertise = 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/daemon/netlink.c 
new/lldpd-1.0.15/src/daemon/netlink.c
--- old/lldpd-1.0.14/src/daemon/netlink.c       2021-08-25 08:38:49.000000000 
+0200
+++ new/lldpd-1.0.15/src/daemon/netlink.c       2022-07-12 20:16:13.000000000 
+0200
@@ -684,6 +684,11 @@
                                        goto end;
                                }
                                if (netlink_parse_address(msg, ifanew) == 0) {
+                                       if (ifanew->address.ss_family == 
AF_INET6 &&
+                                           ifanew->flags & IFA_F_TEMPORARY) {
+                                               interfaces_free_address(ifanew);
+                                               break;
+                                       }
                                        TAILQ_FOREACH(ifaold, ifas, next) {
                                                if ((ifaold->index == 
ifanew->index) &&
                                                    !memcmp(&ifaold->address, 
&ifanew->address,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/daemon/protocols/lldp.c 
new/lldpd-1.0.15/src/daemon/protocols/lldp.c
--- old/lldpd-1.0.14/src/daemon/protocols/lldp.c        2022-05-14 
23:01:41.000000000 +0200
+++ new/lldpd-1.0.15/src/daemon/protocols/lldp.c        2022-08-16 
19:05:44.000000000 +0200
@@ -249,17 +249,19 @@
                }
        }
        /* VLANs */
-       TAILQ_FOREACH(vlan, &port->p_vlans, v_entries) {
-               vlans++;
-               if (!(
-                     POKE_START_LLDP_TLV(LLDP_TLV_ORG) &&
-                     POKE_BYTES(dot1, sizeof(dot1)) &&
-                     POKE_UINT8(LLDP_TLV_DOT1_VLANNAME) &&
-                     POKE_UINT16(vlan->v_vid) &&
-                     POKE_UINT8(strlen(vlan->v_name)) &&
-                     POKE_BYTES(vlan->v_name, strlen(vlan->v_name)) &&
-                     POKE_END_LLDP_TLV))
-                       goto toobig;
+       if (!without_vlans) {
+               TAILQ_FOREACH(vlan, &port->p_vlans, v_entries) {
+                       vlans++;
+                       if (!(
+                             POKE_START_LLDP_TLV(LLDP_TLV_ORG) &&
+                             POKE_BYTES(dot1, sizeof(dot1)) &&
+                             POKE_UINT8(LLDP_TLV_DOT1_VLANNAME) &&
+                             POKE_UINT16(vlan->v_vid) &&
+                             POKE_UINT8(strlen(vlan->v_name)) &&
+                             POKE_BYTES(vlan->v_name, strlen(vlan->v_name)) &&
+                             POKE_END_LLDP_TLV))
+                               goto toobig;
+               }
        }
        /* Protocol Identities */
        TAILQ_FOREACH(pi, &port->p_pids, p_entries) {
@@ -667,6 +669,7 @@
        u_int8_t addr_str_length, addr_str_buffer[32];
        u_int8_t addr_family, addr_length, *addr_ptr, iface_subtype;
        u_int32_t iface_number, iface;
+       int unrecognized;
 #ifdef ENABLE_CUSTOM
        struct lldpd_custom *custom = NULL;
 #endif
@@ -895,10 +898,11 @@
                case LLDP_TLV_ORG:
                        CHECK_TLV_SIZE(1 + (int)sizeof(orgid), 
"Organisational");
                        PEEK_BYTES(orgid, sizeof(orgid));
+                       unrecognized = 0;
                        tlv_subtype = PEEK_UINT8;
                        if (memcmp(dot1, orgid, sizeof(orgid)) == 0) {
 #ifndef ENABLE_DOT1
-                               hardware->h_rx_unrecognized_cnt++;
+                               unrecognized = 1;
 #else
                                /* Dot1 */
                                switch (tlv_subtype) {
@@ -984,12 +988,12 @@
                                        break;
                                default:
                                        /* Unknown Dot1 TLV, ignore it */
-                                       hardware->h_rx_unrecognized_cnt++;
+                                       unrecognized = 1;
                                }
 #endif
                        } else if (memcmp(dot3, orgid, sizeof(orgid)) == 0) {
 #ifndef ENABLE_DOT3
-                               hardware->h_rx_unrecognized_cnt++;
+                               unrecognized = 1;
 #else
                                /* Dot3 */
                                switch (tlv_subtype) {
@@ -1075,13 +1079,13 @@
                                        break;
                                default:
                                        /* Unknown Dot3 TLV, ignore it */
-                                       hardware->h_rx_unrecognized_cnt++;
+                                       unrecognized = 1;
                                }
 #endif
                        } else if (memcmp(med, orgid, sizeof(orgid)) == 0) {
                                /* LLDP-MED */
 #ifndef ENABLE_LLDPMED
-                               hardware->h_rx_unrecognized_cnt++;
+                               unrecognized = 1;
 #else
                                u_int32_t policy;
                                unsigned loctype;
@@ -1275,11 +1279,14 @@
                        } else if (memcmp(dcbx, orgid, sizeof(orgid)) == 0) {
                                log_debug("lldp", "unsupported DCBX tlv 
received on %s - ignore",
                                    hardware->h_ifname);
-                               hardware->h_rx_unrecognized_cnt++;
+                               unrecognized = 1;
                        } else {
                                log_debug("lldp", "unknown org tlv 
[%02x:%02x:%02x] received on %s",
                                    orgid[0], orgid[1], orgid[2],
                                    hardware->h_ifname);
+                               unrecognized = 1;
+                       }
+                       if (unrecognized) {
                                hardware->h_rx_unrecognized_cnt++;
 #ifdef ENABLE_CUSTOM
                                custom = (struct lldpd_custom*)calloc(1, 
sizeof(struct lldpd_custom));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/lib/atoms/chassis.c 
new/lldpd-1.0.15/src/lib/atoms/chassis.c
--- old/lldpd-1.0.14/src/lib/atoms/chassis.c    2022-05-15 11:55:29.000000000 
+0200
+++ new/lldpd-1.0.15/src/lib/atoms/chassis.c    2022-08-11 12:34:21.000000000 
+0200
@@ -234,6 +234,42 @@
        }
 }
 
+static lldpctl_atom_t*
+_lldpctl_atom_set_int_chassis(lldpctl_atom_t *atom, lldpctl_key_t key,
+    long int value)
+{
+       int rc;
+       char *canary = NULL;
+       struct _lldpctl_atom_chassis_t *c =
+           (struct _lldpctl_atom_chassis_t *) atom;
+       struct lldpd_chassis chassis;
+       memcpy(&chassis, c->chassis, sizeof(struct lldpd_chassis));
+
+       switch (key) {
+       case lldpctl_k_chassis_cap_enabled:
+               chassis.c_cap_enabled = c->chassis->c_cap_enabled = 
chassis.c_cap_available & value;
+               break;
+       default:
+               SET_ERROR(atom->conn, LLDPCTL_ERR_NOT_EXIST);
+               return NULL;
+       }
+
+       if (asprintf(&canary, "%d%ld", key, value) == -1) {
+               SET_ERROR(atom->conn, LLDPCTL_ERR_NOMEM);
+               return NULL;
+       }
+
+       rc = _lldpctl_do_something(atom->conn,
+           CONN_STATE_SET_CHASSIS_SEND, CONN_STATE_SET_CHASSIS_RECV,
+           canary,
+           SET_CHASSIS, &chassis, &MARSHAL_INFO(lldpd_chassis),
+           NULL, NULL);
+
+       free(canary);
+       if (rc == 0) return atom;
+       return NULL;
+}
+
 static long int
 _lldpctl_atom_get_int_chassis(lldpctl_atom_t *atom, lldpctl_key_t key)
 {
@@ -287,6 +323,7 @@
          .get  = _lldpctl_atom_get_atom_chassis,
          .get_str = _lldpctl_atom_get_str_chassis,
          .get_int = _lldpctl_atom_get_int_chassis,
+         .set_int = _lldpctl_atom_set_int_chassis,
          .get_buffer = _lldpctl_atom_get_buf_chassis,
 #ifdef ENABLE_LLDPMED
          .set_str = _lldpctl_atom_set_str_chassis,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/lib/atoms/config.c 
new/lldpd-1.0.15/src/lib/atoms/config.c
--- old/lldpd-1.0.14/src/lib/atoms/config.c     2021-08-25 08:38:51.000000000 
+0200
+++ new/lldpd-1.0.15/src/lib/atoms/config.c     2022-08-11 12:34:21.000000000 
+0200
@@ -234,6 +234,8 @@
                return c->config->c_promisc;
        case lldpctl_k_config_chassis_cap_advertise:
                return c->config->c_cap_advertise;
+       case lldpctl_k_config_chassis_cap_override:
+               return c->config->c_cap_override;
        case lldpctl_k_config_chassis_mgmt_advertise:
                return c->config->c_mgmt_advertise;
 #ifdef ENABLE_LLDPMED
@@ -285,6 +287,9 @@
        case lldpctl_k_config_chassis_cap_advertise:
                config.c_cap_advertise = c->config->c_cap_advertise = value;
                break;
+       case lldpctl_k_config_chassis_cap_override:
+               config.c_cap_override = c->config->c_cap_override = value;
+               break;
        case lldpctl_k_config_chassis_mgmt_advertise:
                config.c_mgmt_advertise = c->config->c_mgmt_advertise = value;
                break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/lib/lldpctl.h 
new/lldpd-1.0.15/src/lib/lldpctl.h
--- old/lldpd-1.0.14/src/lib/lldpctl.h  2022-05-15 11:55:29.000000000 +0200
+++ new/lldpd-1.0.15/src/lib/lldpctl.h  2022-08-11 12:34:21.000000000 +0200
@@ -718,6 +718,7 @@
        lldpctl_k_config_cid_string,    /**< `(S,WON)` User defined string for 
the chassis ID */
        lldpctl_k_config_perm_iface_pattern, /**< `(S,WON)` Pattern of 
permanent interfaces */
        lldpctl_k_config_tx_interval_ms, /**< `(I,WO)` Transmit interval in 
milliseconds. Set to -1 to transmit now. */
+       lldpctl_k_config_chassis_cap_override, /**< `(I,WO)` Override chassis 
capabilities */
 
        lldpctl_k_interface_name = 1000, /**< `(S)` The interface name. */
 
@@ -793,13 +794,13 @@
        lldpctl_k_chassis_id,         /**< `(BS)` The ID of this chassis. */
        lldpctl_k_chassis_name,       /**< `(S)` The name of this chassis. */
        lldpctl_k_chassis_descr,      /**< `(S)` The description of this 
chassis. */
-       lldpctl_k_chassis_cap_available, /**< `(I)` Available capabalities (see 
`LLDP_CAP_*`) */
+       lldpctl_k_chassis_cap_available, /**< `(I)` Available capabilities (see 
`LLDP_CAP_*`) */
        lldpctl_k_chassis_cap_enabled,   /**< `(I)` Enabled capabilities (see 
`LLDP_CAP_*`) */
        lldpctl_k_chassis_mgmt,          /**< `(AL)` List of management 
addresses */
        lldpctl_k_chassis_ttl,           /**< Deprecated */
 
        lldpctl_k_chassis_med_type = 1900, /**< `(IS)` Chassis MED type. See 
`LLDP_MED_CLASS_*` */
-       lldpctl_k_chassis_med_cap,  /**< `(I)` Available MED capabilitied. See 
`LLDP_MED_CAP_*` */
+       lldpctl_k_chassis_med_cap,  /**< `(I)` Available MED capabilities. See 
`LLDP_MED_CAP_*` */
        lldpctl_k_chassis_med_inventory_hw, /**< `(S,W)` LLDP MED inventory 
"Hardware Revision" */
        lldpctl_k_chassis_med_inventory_sw, /**< `(S,W)` LLDP MED inventory 
"Software Revision" */
        lldpctl_k_chassis_med_inventory_fw, /**< `(S,W)` LLDP MED inventory 
"Firmware Revision" */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.14/src/lldpd-structs.h 
new/lldpd-1.0.15/src/lldpd-structs.h
--- old/lldpd-1.0.14/src/lldpd-structs.h        2021-12-12 14:45:40.000000000 
+0100
+++ new/lldpd-1.0.15/src/lldpd-structs.h        2022-08-11 12:34:21.000000000 
+0200
@@ -411,6 +411,7 @@
        int c_set_ifdescr;       /* Set interface description */
        int c_promisc;           /* Interfaces should be in promiscuous mode */
        int c_cap_advertise;     /* Chassis capabilities advertisement */
+       int c_cap_override;      /* Override chassis capabilities enabled */
        int c_mgmt_advertise;    /* Management addresses advertisement */
 
 #ifdef ENABLE_LLDPMED

Reply via email to