Hello community,

here is the log from the commit of package lldpd for openSUSE:Factory checked 
in at 2020-11-02 10:36:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lldpd (Old)
 and      /work/SRC/openSUSE:Factory/.lldpd.new.3463 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lldpd"

Mon Nov  2 10:36:31 2020 rev:13 rq:845316 version:1.0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/lldpd/lldpd.changes      2020-10-13 
15:47:52.229507326 +0200
+++ /work/SRC/openSUSE:Factory/.lldpd.new.3463/lldpd.changes    2020-11-02 
10:36:51.511315842 +0100
@@ -1,0 +2,8 @@
+Sun Nov  1 09:57:13 UTC 2020 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 1.0.7:
+  Fix:
+  * Do not listen only to LLDP packets on Linux. When an interface
+    is enslaved to an Open vSwitch, incoming packets are missed.
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ lldpd.spec ++++++
--- /var/tmp/diff_new_pack.WXSZJ8/_old  2020-11-02 10:36:52.099316245 +0100
+++ /var/tmp/diff_new_pack.WXSZJ8/_new  2020-11-02 10:36:52.103316248 +0100
@@ -26,7 +26,7 @@
   %define _fillupdir %{_localstatedir}/adm/fillup-templates
 %endif
 Name:           lldpd
-Version:        1.0.6
+Version:        1.0.7
 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.6.tar.gz -> lldpd-1.0.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.6/.dist-version 
new/lldpd-1.0.7/.dist-version
--- old/lldpd-1.0.6/.dist-version       2020-09-05 13:52:17.000000000 +0200
+++ new/lldpd-1.0.7/.dist-version       2020-10-31 15:58:18.000000000 +0100
@@ -1 +1 @@
-1.0.6
+1.0.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.6/ChangeLog new/lldpd-1.0.7/ChangeLog
--- old/lldpd-1.0.6/ChangeLog   2020-09-05 13:52:16.000000000 +0200
+++ new/lldpd-1.0.7/ChangeLog   2020-10-31 15:58:17.000000000 +0100
@@ -1,3 +1,13 @@
+1.0.7 [2020-10-31 15:34:20 +0100]:
+
+ - [55e14377de15] release: 1.0.7 (Vincent Bernat)
+ - [1fb6eb74df47] Merge pull request #414 from 
vincentbernat/fix/missed-lldp-packets (Vincent Bernat)
+ - [8b50be7f61ad] interfaces: listen to all incoming packets on Linux, not 
just LLDP ones (Vincent Bernat)
+ - [1d06c55cab1e] tests: fix tests around XML by canonicalizing XML 
representation (Vincent Bernat)
+ - [5d9226d14067] linux: ignore outgoing packets at the socket level (Vincent 
Bernat)
+ - [17ec57b2795b] osx: update formula for HomeBrew (with upstream additions) 
(Vincent Bernat)
+ - [836bef0a33c7] osx: update HomeBrew formula (Vincent Bernat)
+
 1.0.6 [2020-09-05 13:48:00 +0200]:
 
  - [06ae963f0520] release: 1.0.6 (Vincent Bernat)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.6/NEWS new/lldpd-1.0.7/NEWS
--- old/lldpd-1.0.6/NEWS        2020-09-05 13:46:28.000000000 +0200
+++ new/lldpd-1.0.7/NEWS        2020-10-31 15:24:44.000000000 +0100
@@ -1,3 +1,8 @@
+lldpd (1.0.7)
+  * Fix:
+    + Do not listen only to LLDP packets on Linux. When an interface
+      is enslaved to an Open vSwitch, incoming packets are missed.
+
 lldpd (1.0.6)
   * Fix:
     + Do not loose chassis local information when interface status changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.6/configure new/lldpd-1.0.7/configure
--- old/lldpd-1.0.6/configure   2020-09-05 13:52:00.000000000 +0200
+++ new/lldpd-1.0.7/configure   2020-10-31 15:57:43.000000000 +0100
@@ -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.6.
+# Generated by GNU Autoconf 2.69 for lldpd 1.0.7.
 #
 # 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.6'
-PACKAGE_STRING='lldpd 1.0.6'
+PACKAGE_VERSION='1.0.7'
+PACKAGE_STRING='lldpd 1.0.7'
 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.6 to adapt to many kinds of systems.
+\`configure' configures lldpd 1.0.7 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.6:";;
+     short | recursive ) echo "Configuration of lldpd 1.0.7:";;
    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.6
+lldpd configure 1.0.7
 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.6, which was
+It was created by lldpd $as_me 1.0.7, 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.6'
+ VERSION='1.0.7'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -23067,7 +23067,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.6, which was
+This file was extended by lldpd $as_me 1.0.7, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23134,7 +23134,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.6
+lldpd config.status 1.0.7
 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.6/src/daemon/interfaces-bpf.c 
new/lldpd-1.0.7/src/daemon/interfaces-bpf.c
--- old/lldpd-1.0.6/src/daemon/interfaces-bpf.c 2020-04-30 20:11:42.000000000 
+0200
+++ new/lldpd-1.0.7/src/daemon/interfaces-bpf.c 2020-10-31 15:24:44.000000000 
+0100
@@ -34,7 +34,7 @@
 
        log_debug("interfaces", "initialize ethernet device %s",
            hardware->h_ifname);
-       if ((fd = priv_iface_init(hardware->h_ifindex, hardware->h_ifname, 0)) 
== -1)
+       if ((fd = priv_iface_init(hardware->h_ifindex, hardware->h_ifname)) == 
-1)
                return -1;
 
        /* Allocate receive buffer */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.6/src/daemon/interfaces-linux.c 
new/lldpd-1.0.7/src/daemon/interfaces-linux.c
--- old/lldpd-1.0.6/src/daemon/interfaces-linux.c       2020-06-27 
17:55:36.000000000 +0200
+++ new/lldpd-1.0.7/src/daemon/interfaces-linux.c       2020-10-31 
15:24:44.000000000 +0100
@@ -43,29 +43,13 @@
 #define MAX_BRIDGES 1024
 
 static int
-only_lldp(struct lldpd *cfg)
-{
-       int lldp_enabled = 0;
-       int other_enabled = 0;
-       size_t i;
-       for (i=0; cfg->g_protocols[i].mode != 0; i++) {
-               if (cfg->g_protocols[i].mode == LLDPD_MODE_LLDP)
-                       lldp_enabled = cfg->g_protocols[i].enabled;
-               else other_enabled = other_enabled || 
cfg->g_protocols[i].enabled;
-       }
-       return lldp_enabled && !other_enabled;
-
-}
-
-static int
 iflinux_eth_init(struct lldpd *cfg, struct lldpd_hardware *hardware)
 {
        int fd;
 
        log_debug("interfaces", "initialize ethernet device %s",
            hardware->h_ifname);
-       if ((fd = priv_iface_init(hardware->h_ifindex, hardware->h_ifname,
-           only_lldp(cfg)?ETH_P_LLDP:ETH_P_ALL)) == -1)
+       if ((fd = priv_iface_init(hardware->h_ifindex, hardware->h_ifname)) == 
-1)
                return -1;
        hardware->h_sendfd = fd; /* Send */
 
@@ -677,7 +661,6 @@
        struct bond_master *master = hardware->h_data;
        int fd;
        int un = 1;
-       int proto;
 
        if (!master) return -1;
 
@@ -685,9 +668,8 @@
            hardware->h_ifname);
 
        /* First, we get a socket to the raw physical interface */
-       proto = only_lldp(cfg)?ETH_P_LLDP:ETH_P_ALL;
        if ((fd = priv_iface_init(hardware->h_ifindex,
-           hardware->h_ifname, proto)) == -1)
+                       hardware->h_ifname)) == -1)
                return -1;
        hardware->h_sendfd = fd;
        interfaces_setup_multicast(cfg, hardware->h_ifname, 0);
@@ -695,7 +677,7 @@
        /* Then, we open a raw interface for the master */
        log_debug("interfaces", "enslaved device %s has master %s(%d)",
            hardware->h_ifname, master->name, master->index);
-       if ((fd = priv_iface_init(master->index, master->name, proto)) == -1) {
+       if ((fd = priv_iface_init(master->index, master->name)) == -1) {
                close(hardware->h_sendfd);
                return -1;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.6/src/daemon/lldpd.h 
new/lldpd-1.0.7/src/daemon/lldpd.h
--- old/lldpd-1.0.6/src/daemon/lldpd.h  2020-06-27 17:55:36.000000000 +0200
+++ new/lldpd-1.0.7/src/daemon/lldpd.h  2020-10-31 15:24:44.000000000 +0100
@@ -201,8 +201,8 @@
 int             priv_open(char*);
 void    asroot_open(void);
 #endif
-int             priv_iface_init(int, char *, int);
-int     asroot_iface_init_os(int, char *, int *, int);
+int             priv_iface_init(int, char *);
+int     asroot_iface_init_os(int, char *, int *);
 int     priv_iface_multicast(const char *, const u_int8_t *, int);
 int     priv_iface_description(const char *, const char *);
 int     asroot_iface_description_os(const char *, const char *);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.6/src/daemon/priv-bsd.c 
new/lldpd-1.0.7/src/daemon/priv-bsd.c
--- old/lldpd-1.0.6/src/daemon/priv-bsd.c       2020-04-30 20:11:42.000000000 
+0200
+++ new/lldpd-1.0.7/src/daemon/priv-bsd.c       2020-10-31 15:24:44.000000000 
+0100
@@ -27,7 +27,7 @@
 #include <string.h>
 
 int
-asroot_iface_init_os(int ifindex, char *name, int *fd, int proto)
+asroot_iface_init_os(int ifindex, char *name, int *fd)
 {
        int enable, required, rc;
        struct bpf_insn filter[] = { LLDPD_FILTER_F };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.6/src/daemon/priv-linux.c 
new/lldpd-1.0.7/src/daemon/priv-linux.c
--- old/lldpd-1.0.6/src/daemon/priv-linux.c     2020-04-30 20:11:42.000000000 
+0200
+++ new/lldpd-1.0.7/src/daemon/priv-linux.c     2020-10-31 15:24:44.000000000 
+0100
@@ -115,12 +115,12 @@
 }
 
 int
-asroot_iface_init_os(int ifindex, char *name, int *fd, int proto)
+asroot_iface_init_os(int ifindex, char *name, int *fd)
 {
        int rc;
        /* Open listening socket to receive/send frames */
        if ((*fd = socket(PF_PACKET, SOCK_RAW,
-                   htons(proto))) < 0) {
+                   htons(ETH_P_ALL))) < 0) {
                rc = errno;
                return rc;
        }
@@ -145,22 +145,35 @@
                .len = sizeof(lldpd_filter_f) / sizeof(struct sock_filter)
        };
        if (setsockopt(*fd, SOL_SOCKET, SO_ATTACH_FILTER,
-                &prog, sizeof(prog)) < 0) {
+           &prog, sizeof(prog)) < 0) {
                rc = errno;
                log_warn("privsep", "unable to change filter for %s", name);
                return rc;
        }
 
 #ifdef SO_LOCK_FILTER
-       int enable = 1;
+       int lock = 1;
        if (setsockopt(*fd, SOL_SOCKET, SO_LOCK_FILTER,
-               &enable, sizeof(enable)) < 0) {
+           &lock, sizeof(lock)) < 0) {
                if (errno != ENOPROTOOPT) {
                        rc = errno;
                        log_warn("privsep", "unable to lock filter for %s", 
name);
                        return rc;
                }
        }
+#endif
+#ifdef PACKET_IGNORE_OUTGOING
+       int ignore = 1;
+       if (setsockopt(*fd, SOL_PACKET, PACKET_IGNORE_OUTGOING,
+           &ignore, sizeof(ignore)) < 0) {
+               if (errno != ENOPROTOOPT) {
+                       rc = errno;
+                       log_warn("privsep",
+                           "unable to set packet direction for BPF filter on 
%s",
+                           name);
+                       return rc;
+               }
+       }
 #endif
 
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lldpd-1.0.6/src/daemon/priv.c 
new/lldpd-1.0.7/src/daemon/priv.c
--- old/lldpd-1.0.6/src/daemon/priv.c   2020-05-31 09:45:50.000000000 +0200
+++ new/lldpd-1.0.7/src/daemon/priv.c   2020-10-31 15:24:44.000000000 +0100
@@ -120,7 +120,7 @@
 
 
 int
-priv_iface_init(int index, char *iface, int proto)
+priv_iface_init(int index, char *iface)
 {
        int rc;
        char dev[IFNAMSIZ] = {};
@@ -129,7 +129,6 @@
        must_write(PRIV_UNPRIVILEGED, &index, sizeof(int));
        strlcpy(dev, iface, IFNAMSIZ);
        must_write(PRIV_UNPRIVILEGED, dev, IFNAMSIZ);
-       must_write(PRIV_UNPRIVILEGED, &proto, sizeof(int));
        priv_wait();
        must_read(PRIV_UNPRIVILEGED, &rc, sizeof(int));
        if (rc != 0) return -1;
@@ -251,15 +250,13 @@
 {
        int rc = -1, fd = -1;
        int ifindex;
-       int proto;
        char name[IFNAMSIZ];
        must_read(PRIV_PRIVILEGED, &ifindex, sizeof(ifindex));
        must_read(PRIV_PRIVILEGED, &name, sizeof(name));
        name[sizeof(name) - 1] = '\0';
-       must_read(PRIV_PRIVILEGED, &proto, sizeof(proto));
 
        TRACE(LLDPD_PRIV_INTERFACE_INIT(name));
-       rc = asroot_iface_init_os(ifindex, name, &fd, proto);
+       rc = asroot_iface_init_os(ifindex, name, &fd);
        must_write(PRIV_PRIVILEGED, &rc, sizeof(rc));
        if (rc == 0 && fd >=0) send_fd(PRIV_PRIVILEGED, fd);
        if (fd >= 0) close(fd);



Reply via email to