Hello community,

here is the log from the commit of package libteam for openSUSE:Factory checked 
in at 2017-11-30 12:33:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libteam (Old)
 and      /work/SRC/openSUSE:Factory/.libteam.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libteam"

Thu Nov 30 12:33:41 2017 rev:16 rq:544445 version:1.27

Changes:
--------
--- /work/SRC/openSUSE:Factory/libteam/libteam.changes  2016-12-02 
16:40:12.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libteam.new/libteam.changes     2017-11-30 
12:33:45.491297568 +0100
@@ -1,0 +2,37 @@
+Wed Nov 22 16:52:51 CET 2017 - [email protected]
+
+- allow send_interface in dbus conf file for wicked.
+  [+ 0001-allow-send_interface-dbus.patch] 
+-------------------------------------------------------------------
+Wed Nov 22 11:17:03 UTC 2017 - [email protected]
+
+- Update to new upstream release 1.27
+  * teamd: escape some sensitive characters in ifname with
+    double quotation marks
+  * libteam: resynchronize ifinfo after lost RTNLGRP_LINK
+    notifications
+  * teamd: check port link_up when a port is added with
+    loadbalance runner
+
+-------------------------------------------------------------------
+Wed Nov 22 10:54:50 UTC 2017 - [email protected]
+
+- Do not suppress errors from useradd
+
+-------------------------------------------------------------------
+Wed Nov 22 11:26:44 CET 2017 - [email protected]
+
+- sync with SLES changes(bsc#1055708)
+* Add check_if_psr_ops_were_initialized.patch:
+** Fix teamd segfault when link_watch initialization callbacks fail
+  (e.g. lw_psr_port_added() in case of activebackup runner) due to
+  an attempt to change hwaddr on an enslaved, link up port device.
+  Note: enslavement triggers initialization callbacks.
+* Add ignore_ebusy_for_team_hwaddr_set.patch:
+** Make PortAdd and PortRemove dbus methods work for all runners.
+  Ignore attempts to change hwaddr of an already enslaved devices.
+  (fate#318389,fate#317728,fate#316923)
+- Add start_teamd_from_usr_sbin.patch:
+* Modify service file to start teamd instance from /usr/sbin.
+
+-------------------------------------------------------------------

Old:
----
  libteam-1.26.tar.gz

New:
----
  0001-allow-send_interface-dbus.patch
  check_if_psr_ops_were_initialized.patch
  ignore_ebusy_for_team_hwaddr_set.patch
  libteam-1.27.tar.gz
  start_teamd_from_usr_sbin.patch

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

Other differences:
------------------
++++++ libteam.spec ++++++
--- /var/tmp/diff_new_pack.EIlyc9/_old  2017-11-30 12:33:46.231270660 +0100
+++ /var/tmp/diff_new_pack.EIlyc9/_new  2017-11-30 12:33:46.231270660 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libteam
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           libteam
-Version:        1.26
+Version:        1.27
 Release:        0
 Summary:        Utilities for controlling 802.1AX team network device
 License:        LGPL-2.1+
@@ -29,6 +29,7 @@
 Source:         http://libteam.org/files/%name-%version.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  doxygen
+BuildRequires:  libcap-devel
 BuildRequires:  pkg-config
 BuildRequires:  python-devel
 BuildRequires:  swig
@@ -42,6 +43,15 @@
 %if 0%{?suse_version} >= 1220
 BuildRequires:  systemd-rpm-macros
 %endif
+Patch0:         check_if_psr_ops_were_initialized.patch
+Patch1:         start_teamd_from_usr_sbin.patch
+Patch2:         ignore_ebusy_for_team_hwaddr_set.patch
+Patch3:         0001-allow-send_interface-dbus.patch
+%define teamd_user                     teamd
+%define teamd_group                    daemon
+%define teamd_daemon_directory         /run/teamd
+%define teamd_dbus_policy_directory    %_sysconfdir/dbus-1/system.d
+%define teamd_dbus_policy_name         org.libteam.teamd.conf
 
 %description
 A library which is the user-space counterpart for the team network
@@ -109,39 +119,59 @@
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %configure --includedir="%_includedir/pkg/%name" --bindir="%_sbindir" \
-       --disable-static
+       --disable-static \
+       --with-run-dir=%teamd_daemon_directory \
+       --with-user=%teamd_user \
+       --with-group=%teamd_group
 # Use CFLAGS= to kill -Werror
 make %{?_smp_mflags} CFLAGS="%optflags"
 
-pushd binding/python/;
-python ./setup.py build;
-popd;
+pushd binding/python/
+python ./setup.py build
+popd
 
 %install
-b="%buildroot";
-make install DESTDIR="$b";
-pushd binding/python/;
-python ./setup.py install --root="$b" --prefix="%_prefix";
-popd;
+b="%buildroot"
+%make_install
+pushd binding/python/
+python ./setup.py install --root="$b" --prefix="%_prefix"
+popd
 
 rm -f "$b/%_libdir"/*.la
 %if 0%{?_unitdir:1}
-mkdir -p "$b/%_unitdir";
-install -pm0644 teamd/redhat/systemd/*.service "$b/%_unitdir/";
+mkdir -p "$b/%_unitdir"
+install -pm0644 teamd/redhat/systemd/*.service "$b/%_unitdir/"
+%endif
+
+%if 0%{?_sysconfdir:1}
+mkdir -p "$b/%teamd_dbus_policy_directory/"
+install -pm0644 teamd/dbus/teamd.conf 
"$b/%teamd_dbus_policy_directory/%teamd_dbus_policy_name"
 %endif
 
 %check
 make check
 
 %pre tools
+getent group daemon >/dev/null || %_sbindir/groupadd -r %teamd_group
+getent passwd %teamd_user >/dev/null || \
+       %_sbindir/useradd -r -g %teamd_group -s /bin/false \
+       -c "Teamd daemon user" -d %{_localstatedir}/lib/empty %teamd_user
+%_sbindir/usermod -g %teamd_group %teamd_user 2>/dev/null
+test -L %teamd_daemon_directory  || rm -rf %teamd_daemon_directory && :
 %if 0%{?_unitdir:1}
 %service_add_pre [email protected]
 %endif
 
 %post tools
+# reload dbus to apply new teamd's policy
+/usr/bin/systemctl reload dbus.service 2>/dev/null || :
 %if 0%{?_unitdir:1}
 %service_add_post [email protected]
 %endif
@@ -155,6 +185,10 @@
 %if 0%{?_unitdir:1}
 %service_del_postun [email protected]
 %endif
+# reload dbus to forget teamd's policy
+if [ ${FIRST_ARG:-$1} -eq 0 ]; then
+        /usr/bin/systemctl reload dbus.service 2>/dev/null || :
+fi
 
 %post   -n libteam5 -p /sbin/ldconfig
 %postun -n libteam5 -p /sbin/ldconfig
@@ -180,6 +214,9 @@
 %defattr(-,root,root)
 %_sbindir/bond2team
 %_sbindir/team*
+%dir %_sysconfdir/dbus-1
+%dir %teamd_dbus_policy_directory
+%config %teamd_dbus_policy_directory/%teamd_dbus_policy_name
 %_mandir/man1/*
 %_mandir/man5/*
 %_mandir/man8/*

++++++ 0001-allow-send_interface-dbus.patch ++++++
>From f0ebd1613f748f5ba4f873935d3e171cdeb8620c Mon Sep 17 00:00:00 2001
From: Nirmoy Das <[email protected]>
Date: Wed, 22 Nov 2017 16:49:53 +0100
Subject: [PATCH] allow send_interface dbus

---
 teamd/teamd.conf.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/teamd/teamd.conf.in b/teamd/teamd.conf.in
index 6ca3282..8fca859 100644
--- a/teamd/teamd.conf.in
+++ b/teamd/teamd.conf.in
@@ -4,11 +4,14 @@
 <busconfig>
        <policy user="root">
                <allow own_prefix="org.libteam.teamd"/>
+               <allow send_interface="org.libteam.teamd"/>
        </policy>
        <policy user="@teamd_user@">
                <allow own_prefix="org.libteam.teamd"/>
+               <allow send_interface="org.libteam.teamd"/>
        </policy>
        <policy context="default">
                <deny own_prefix="org.libteam.teamd"/>
+               <allow send_interface="org.libteam.teamd"/>
        </policy>
 </busconfig>
-- 
2.15.0

++++++ check_if_psr_ops_were_initialized.patch ++++++
Index: libteam-1.16/teamd/teamd_lw_psr.c
===================================================================
--- libteam-1.16.orig/teamd/teamd_lw_psr.c
+++ libteam-1.16/teamd/teamd_lw_psr.c
@@ -39,6 +39,9 @@ static int lw_psr_callback_periodic(stru
        bool link_up = common_ppriv->link_up;
        int err;
 
+       if (!psr_ppriv->ops)
+               return -EINVAL;
+
        if (psr_ppriv->reply_received) {
                link_up = true;
                psr_ppriv->missed = 0;
@@ -65,6 +68,9 @@ static int lw_psr_callback_socket(struct
 {
        struct lw_psr_port_priv *psr_ppriv = priv;
 
+       if (!psr_ppriv->ops)
+               return -EINVAL;
+
        return psr_ppriv->ops->receive(psr_ppriv);
 }
 
@@ -120,6 +126,9 @@ int lw_psr_port_added(struct teamd_conte
        struct lw_psr_port_priv *psr_ppriv = priv;
        int err;
 
+       if (!psr_ppriv->ops)
+               return -EINVAL;
+
        err = lw_psr_load_options(ctx, tdport, psr_ppriv);
        if (err) {
                teamd_log_err("Failed to load options.");
@@ -182,6 +191,9 @@ void lw_psr_port_removed(struct teamd_co
 {
        struct lw_psr_port_priv *psr_ppriv = priv;
 
+       if (!psr_ppriv->ops)
+               return;
+
        teamd_loop_callback_del(ctx, LW_PERIODIC_CB_NAME, psr_ppriv);
        teamd_loop_callback_del(ctx, LW_SOCKET_CB_NAME, psr_ppriv);
        psr_ppriv->ops->sock_close(psr_ppriv);
++++++ ignore_ebusy_for_team_hwaddr_set.patch ++++++
Index: libteam-1.18/libteam/libteam.c
===================================================================
--- libteam-1.18.orig/libteam/libteam.c
+++ libteam-1.18/libteam/libteam.c
@@ -1633,6 +1633,9 @@ int team_hwaddr_set(struct team_handle *
        err = rtnl_link_change(th->nl_cli.sock, link, link, 0);
        err = -nl2syserr(err);
 
+       if (err == -EBUSY)
+               err = 0;
+
        nl_addr_put(nl_addr);
 
 errout:
++++++ libteam-1.26.tar.gz -> libteam-1.27.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/Makefile.in new/libteam-1.27/Makefile.in
--- old/libteam-1.26/Makefile.in        2016-08-26 10:30:56.000000000 +0200
+++ new/libteam-1.27/Makefile.in        2017-06-05 15:40:55.000000000 +0200
@@ -583,7 +583,7 @@
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c 
>$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c 
>$(distdir).tar.gz
        $(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -609,7 +609,7 @@
        @echo WARNING: "Support for shar distribution archives is" \
                       "deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -627,7 +627,7 @@
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lz*) \
@@ -637,7 +637,7 @@
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/README new/libteam-1.27/README
--- old/libteam-1.26/README     2016-05-20 11:07:27.000000000 +0200
+++ new/libteam-1.27/README     2017-03-17 18:41:22.000000000 +0100
@@ -1,3 +1,7 @@
+# SUBMITTING PATCHES / PULL REQUESTS - README!!! #
+
+All github pull requests will be ignored! Please send the patches to the 
libteam mailing list, according to "SubmittingPatches" file.
+
 # libteam - Library for controlling team network device #
 
 The purpose of the Team driver is to provide a mechanism to team multiple NICs 
(ports) into one logical one (teamdev) at L2 layer. The process is called 
"channel bonding", "Ethernet bonding", "channel teaming", "link aggregation", 
etc. This is already implemented in the Linux kernel by the bonding driver.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/aclocal.m4 new/libteam-1.27/aclocal.m4
--- old/libteam-1.26/aclocal.m4 2016-08-26 10:30:54.000000000 +0200
+++ new/libteam-1.27/aclocal.m4 2017-06-05 15:40:54.000000000 +0200
@@ -20,32 +20,63 @@
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 
'autoreconf'.])])
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-# 
-# Copyright © 2004 Scott James Remnant <[email protected]>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
+dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29.1)
+dnl
+dnl Copyright © 2004 Scott James Remnant <[email protected]>.
+dnl Copyright © 2012-2015 Dan Nicholson <[email protected]>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl     [m4_fatal([must install pkg-config 0.29 or later before running 
autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.1])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+    [m4_fatal([pkg.m4 version $1 or higher is required but 
]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
@@ -67,18 +98,19 @@
                PKG_CONFIG=""
        fi
 fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+])dnl PKG_PROG_PKG_CONFIG
 
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
 AC_DEFUN([PKG_CHECK_EXISTS],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 if test -n "$PKG_CONFIG" && \
@@ -88,8 +120,10 @@
   $3])dnl
 fi])
 
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
 m4_define([_PKG_CONFIG],
 [if test -n "$$1"; then
     pkg_cv_[]$1="$$1"
@@ -101,10 +135,11 @@
  else
     pkg_failed=untried
 fi[]dnl
-])# _PKG_CONFIG
+])dnl _PKG_CONFIG
 
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -112,19 +147,17 @@
 else
         _pkg_short_errors_supported=no
 fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
 
 
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 AC_DEFUN([PKG_CHECK_MODULES],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
@@ -178,16 +211,40 @@
         AC_MSG_RESULT([yes])
        $3
 fi[]dnl
-])# PKG_CHECK_MODULES
+])dnl PKG_CHECK_MODULES
 
 
-# PKG_INSTALLDIR(DIRECTORY)
-# -------------------------
-# Substitutes the variable pkgconfigdir as the location where a module
-# should install pkg-config .pc files. By default the directory is
-# $libdir/pkgconfig, but the default can be changed by passing
-# DIRECTORY. The user can override through the --with-pkgconfigdir
-# parameter.
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
 AC_DEFUN([PKG_INSTALLDIR],
 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
 m4_pushdef([pkg_description],
@@ -198,16 +255,18 @@
 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
 m4_popdef([pkg_default])
 m4_popdef([pkg_description])
-]) dnl PKG_INSTALLDIR
+])dnl PKG_INSTALLDIR
 
 
-# PKG_NOARCH_INSTALLDIR(DIRECTORY)
-# -------------------------
-# Substitutes the variable noarch_pkgconfigdir as the location where a
-# module should install arch-independent pkg-config .pc files. By
-# default the directory is $datadir/pkgconfig, but the default can be
-# changed by passing DIRECTORY. The user can override through the
-# --with-noarch-pkgconfigdir parameter.
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
 m4_pushdef([pkg_description],
@@ -218,13 +277,15 @@
 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
 m4_popdef([pkg_default])
 m4_popdef([pkg_description])
-]) dnl PKG_NOARCH_INSTALLDIR
+])dnl PKG_NOARCH_INSTALLDIR
 
 
-# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
-# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# -------------------------------------------
-# Retrieves the value of the pkg-config variable for the given module.
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
 AC_DEFUN([PKG_CHECK_VAR],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
@@ -233,7 +294,7 @@
 AS_VAR_COPY([$1], [pkg_cv_][$1])
 
 AS_VAR_IF([$1], [""], [$5], [$4])dnl
-])# PKG_CHECK_VAR
+])dnl PKG_CHECK_VAR
 
 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
 #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/configure new/libteam-1.27/configure
--- old/libteam-1.26/configure  2016-08-26 10:30:55.000000000 +0200
+++ new/libteam-1.27/configure  2017-06-05 15:40:54.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libteam 1.26.
+# Generated by GNU Autoconf 2.69 for libteam 1.27.
 #
 # Report bugs to <[email protected]>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='libteam'
 PACKAGE_TARNAME='libteam'
-PACKAGE_VERSION='1.26'
-PACKAGE_STRING='libteam 1.26'
+PACKAGE_VERSION='1.27'
+PACKAGE_STRING='libteam 1.27'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL=''
 
@@ -1356,7 +1356,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 libteam 1.26 to adapt to many kinds of systems.
+\`configure' configures libteam 1.27 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1426,7 +1426,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libteam 1.26:";;
+     short | recursive ) echo "Configuration of libteam 1.27:";;
    esac
   cat <<\_ACEOF
 
@@ -1564,7 +1564,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libteam configure 1.26
+libteam configure 1.27
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1933,7 +1933,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libteam $as_me 1.26, which was
+It was created by libteam $as_me 1.27, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2799,7 +2799,7 @@
 
 # Define the identity of the package.
  PACKAGE='libteam'
- VERSION='1.26'
+ VERSION='1.27'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4157,11 +4157,11 @@
 # 6. If any interfaces have been removed or changed since the last public
 #    release, then set age to 0.
 
-LIBTEAM_CURRENT=8
+LIBTEAM_CURRENT=9
 
-LIBTEAM_REVISION=5
+LIBTEAM_REVISION=0
 
-LIBTEAM_AGE=3
+LIBTEAM_AGE=4
 
 
 LIBTEAMDCTL_CURRENT=1
@@ -14541,7 +14541,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libteam $as_me 1.26, which was
+This file was extended by libteam $as_me 1.27, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14607,7 +14607,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libteam config.status 1.26
+libteam config.status 1.27
 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/libteam-1.26/configure.ac 
new/libteam-1.27/configure.ac
--- old/libteam-1.26/configure.ac       2016-08-26 10:30:05.000000000 +0200
+++ new/libteam-1.27/configure.ac       2017-06-05 11:32:43.000000000 +0200
@@ -1,7 +1,7 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
-AC_INIT([libteam], [1.26], [[email protected]])
+AC_INIT([libteam], [1.27], [[email protected]])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h])
@@ -23,9 +23,9 @@
 # 6. If any interfaces have been removed or changed since the last public
 #    release, then set age to 0.
 
-AC_SUBST(LIBTEAM_CURRENT, 8)
-AC_SUBST(LIBTEAM_REVISION, 5)
-AC_SUBST(LIBTEAM_AGE, 3)
+AC_SUBST(LIBTEAM_CURRENT, 9)
+AC_SUBST(LIBTEAM_REVISION, 0)
+AC_SUBST(LIBTEAM_AGE, 4)
 
 AC_SUBST(LIBTEAMDCTL_CURRENT, 1)
 AC_SUBST(LIBTEAMDCTL_REVISION, 5)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/include/team.h 
new/libteam-1.27/include/team.h
--- old/libteam-1.26/include/team.h     2016-05-20 11:07:27.000000000 +0200
+++ new/libteam-1.27/include/team.h     2017-04-11 08:40:23.000000000 +0200
@@ -68,6 +68,8 @@
 int team_set_bpf_hash_func(struct team_handle *th, const struct sock_fprog 
*fp);
 int team_set_port_enabled(struct team_handle *th,
                          uint32_t port_ifindex, bool val);
+int team_get_port_enabled(struct team_handle *th,
+                         uint32_t port_ifindex, bool *enabled);
 int team_set_port_user_linkup_enabled(struct team_handle *th,
                                      uint32_t port_ifindex, bool val);
 int team_get_port_user_linkup(struct team_handle *th,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/libteam/ifinfo.c 
new/libteam-1.27/libteam/ifinfo.c
--- old/libteam-1.26/libteam/ifinfo.c   2016-05-20 11:07:27.000000000 +0200
+++ new/libteam-1.27/libteam/ifinfo.c   2017-03-17 18:41:22.000000000 +0100
@@ -72,6 +72,10 @@
 #define CHANGED_PHYS_PORT_ID           (1 << 5)
 #define CHANGED_PHYS_PORT_ID_LEN       (1 << 6)
 #define CHANGED_ADMIN_STATE            (1 << 7)
+/* This is only used when tagging interfaces for finding
+ * removed, and thus not included to CHANGED_ANY.
+ */
+#define CHANGED_REFRESHING             (1 << 8)
 #define CHANGED_ANY    (CHANGED_REMOVED | CHANGED_HWADDR | \
                         CHANGED_HWADDR_LEN | CHANGED_IFNAME | \
                         CHANGED_MASTER_IFINDEX | CHANGED_PHYS_PORT_ID | \
@@ -202,7 +206,7 @@
        return NULL;
 }
 
-static void clear_last_changed(struct team_handle *th)
+void ifinfo_clear_changed(struct team_handle *th)
 {
        struct team_ifinfo *ifinfo;
 
@@ -236,7 +240,7 @@
        free(ifinfo);
 }
 
-static void ifinfo_destroy_removed(struct team_handle *th)
+void ifinfo_destroy_removed(struct team_handle *th)
 {
        struct team_ifinfo *ifinfo, *tmp;
 
@@ -254,8 +258,6 @@
        uint32_t ifindex;
        int err;
 
-       ifinfo_destroy_removed(th);
-
        link = (struct rtnl_link *) obj;
 
        ifindex = rtnl_link_get_ifindex(link);
@@ -269,7 +271,7 @@
                        return;
        }
 
-       clear_last_changed(th);
+       clear_changed(ifinfo);
        ifinfo_update(ifinfo, link);
 
        if (event)
@@ -292,8 +294,6 @@
        uint32_t ifindex;
        int err;
 
-       ifinfo_destroy_removed(th);
-
        link = (struct rtnl_link *) obj;
 
        ifindex = rtnl_link_get_ifindex(link);
@@ -311,7 +311,7 @@
                return;
        }
 
-       clear_last_changed(th);
+       clear_changed(ifinfo);
        set_changed(ifinfo, CHANGED_REMOVED);
        set_call_change_handlers(th, TEAM_IFINFO_CHANGE);
 }
@@ -367,6 +367,14 @@
        };
        int ret;
        int retry = 1;
+       struct team_ifinfo *ifinfo;
+
+       /* Tag all ifinfo, this is cleared in newlink handler.
+        * Any interface that has this after dump is processed
+        * has been removed.
+        */
+       list_for_each_node_entry(ifinfo, &th->ifinfo_list, list)
+               set_changed(ifinfo, CHANGED_REFRESHING);
 
        while (retry) {
                retry = 0;
@@ -395,6 +403,15 @@
                        retry = 1;
                }
        }
+
+       list_for_each_node_entry(ifinfo, &th->ifinfo_list, list) {
+               if (is_changed(ifinfo, CHANGED_REFRESHING)) {
+                       clear_changed(ifinfo);
+                       set_changed(ifinfo, CHANGED_REMOVED);
+                       set_call_change_handlers(th, TEAM_IFINFO_CHANGE);
+               }
+       }
+
        ret = check_call_change_handlers(th, TEAM_IFINFO_CHANGE);
        if (ret < 0)
                err(th, "get_ifinfo_list: check_call_change_handers failed");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/libteam/libteam.c 
new/libteam-1.27/libteam/libteam.c
--- old/libteam-1.26/libteam/libteam.c  2016-05-20 11:07:27.000000000 +0200
+++ new/libteam-1.27/libteam/libteam.c  2017-04-11 08:40:23.000000000 +0200
@@ -236,6 +236,10 @@
                                break;
                }
        }
+       if (call_type_mask & TEAM_IFINFO_CHANGE) {
+               ifinfo_destroy_removed(th);
+               ifinfo_clear_changed(th);
+       }
        th->change_handler.pending_type_mask &= ~call_type_mask;
        return err;
 }
@@ -546,6 +550,11 @@
 #endif
 /* \endcond */
 
+/* libnl uses default 32k socket receive buffer size,
+ * whicn can get too small. Use 96k for all sockets.
+ */
+#define NETLINK_RCVBUF 98304
+
 /**
  * @param th           libteam library context
  * @param ifindex      team device interface index
@@ -561,6 +570,8 @@
        int err;
        int grp_id;
        int val;
+       int eventbufsize;
+       const char *env;
 
        if (!ifindex) {
                err(th, "Passed interface index %d is not valid.", ifindex);
@@ -589,12 +600,12 @@
                return -errno;
        }
 
-       err = nl_socket_set_buffer_size(th->nl_sock, 98304, 0);
+       err = nl_socket_set_buffer_size(th->nl_sock, NETLINK_RCVBUF, 0);
        if (err) {
                err(th, "Failed to set buffer size of netlink sock.");
                return -nl2syserr(err);
        }
-       err = nl_socket_set_buffer_size(th->nl_sock_event, 98304, 0);
+       err = nl_socket_set_buffer_size(th->nl_sock_event, NETLINK_RCVBUF, 0);
        if (err) {
                err(th, "Failed to set buffer size of netlink event sock.");
                return -nl2syserr(err);
@@ -627,6 +638,25 @@
        nl_socket_modify_cb(th->nl_cli.sock_event, NL_CB_VALID,
                            NL_CB_CUSTOM, cli_event_handler, th);
        nl_cli_connect(th->nl_cli.sock_event, NETLINK_ROUTE);
+
+       env = getenv("TEAM_EVENT_BUFSIZE");
+       if (env) {
+               eventbufsize = strtol(env, NULL, 10);
+               /* ignore other errors, libnl forces minimum 32k and
+                * too large values are truncated to system rmem_max
+                */
+               if (eventbufsize < 0)
+                       eventbufsize = 0;
+       } else {
+               eventbufsize = NETLINK_RCVBUF;
+       }
+
+       err = nl_socket_set_buffer_size(th->nl_cli.sock_event, eventbufsize, 0);
+       if (err) {
+               err(th, "Failed to set cli event socket buffer size.");
+               return err;
+       }
+
        err = nl_socket_add_membership(th->nl_cli.sock_event, RTNLGRP_LINK);
        if (err < 0) {
                err(th, "Failed to add netlink membership.");
@@ -767,7 +797,23 @@
 
 static int cli_sock_event_handler(struct team_handle *th)
 {
-       nl_recvmsgs_default(th->nl_cli.sock_event);
+       int err;
+
+       err = nl_recvmsgs_default(th->nl_cli.sock_event);
+       err = -nl2syserr(err);
+
+       /* libnl thinks ENOBUFS and ENOMEM are same. Hope it was ENOBUFS. */
+       if (err == -ENOMEM) {
+               warn(th, "Lost link notifications from kernel.");
+               /* There's no way to know what events were lost and no
+                * way to get them again. Refresh all.
+                */
+               err = get_ifinfo_list(th);
+       }
+
+       if (err)
+               return err;
+
        return check_call_change_handlers(th, TEAM_IFINFO_CHANGE);
 }
 
@@ -1293,6 +1339,28 @@
 }
 
 /**
+ * @param th           libteam library context
+ * @param port_ifindex port interface index
+ * @param enabled      where the enabled state will be stored
+ *
+ * @details Gets enabled state for port identified by port_ifindex
+ *
+ * @return Zero on success or negative number in case of an error.
+ **/
+TEAM_EXPORT
+int team_get_port_enabled(struct team_handle *th,
+                         uint32_t port_ifindex, bool *enabled)
+{
+       struct team_option *option;
+
+       option = team_get_option(th, "np", "enabled", port_ifindex);
+       if (!option)
+               return -ENOENT;
+       *enabled = team_get_option_value_bool(option);
+       return 0;
+}
+
+/**
  * @param th           libteam library context
  * @param port_ifindex port interface index
  * @param val          boolean value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/libteam/team_private.h 
new/libteam-1.27/libteam/team_private.h
--- old/libteam-1.26/libteam/team_private.h     2016-05-20 11:07:27.000000000 
+0200
+++ new/libteam-1.27/libteam/team_private.h     2017-03-17 18:41:23.000000000 
+0100
@@ -115,6 +115,9 @@
 int ifinfo_link(struct team_handle *th, uint32_t ifindex,
                struct team_ifinfo **p_ifinfo);
 void ifinfo_unlink(struct team_ifinfo *ifinfo);
+void ifinfo_clear_changed(struct team_handle *th);
+void ifinfo_destroy_removed(struct team_handle *th);
+int get_ifinfo_list(struct team_handle *th);
 int get_options_handler(struct nl_msg *msg, void *arg);
 int option_list_alloc(struct team_handle *th);
 int option_list_init(struct team_handle *th);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/man/teamdctl.8 
new/libteam-1.27/man/teamdctl.8
--- old/libteam-1.26/man/teamdctl.8     2016-05-20 11:07:27.000000000 +0200
+++ new/libteam-1.27/man/teamdctl.8     2017-03-17 18:41:23.000000000 +0100
@@ -50,6 +50,8 @@
 .TP
 .BI "state item get " state_item_path
 Finds state item in JSON state document and returns its value.
+
+If PORTIFNAME in state_item_path has any sensitive character, use double 
quotation marks to escape it, like: ports."eth1.1".link_watches.up. To process 
state_item_path of 'state item set' is the same as here.
 .TP
 .BI "state item set " "state_item_path value"
 Finds state item in JSON state document and sets its value by value parameter. 
This is available only for a limited number of paths:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/teamd/teamd_json.c 
new/libteam-1.27/teamd/teamd_json.c
--- old/libteam-1.26/teamd/teamd_json.c 2016-05-20 11:07:27.000000000 +0200
+++ new/libteam-1.27/teamd/teamd_json.c 2017-03-17 18:41:23.000000000 +0100
@@ -76,7 +76,16 @@
                        char tmp = 0; /* gcc needs this initialized */
 
                        ptr++;
-                       end = __strchrs(ptr, ".[");
+                       if (*ptr == '\"') {
+                               ptr++;
+                               end = strrchr(ptr, '\"');
+                               if (end) {
+                                       *end = '\0';
+                                       end++;
+                               }
+                       } else {
+                               end = __strchrs(ptr, ".[");
+                       }
                        if (end) {
                                tmp = *end;
                                *end = '\0';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/teamd/teamd_lw_nsna_ping.c 
new/libteam-1.27/teamd/teamd_lw_nsna_ping.c
--- old/libteam-1.26/teamd/teamd_lw_nsna_ping.c 2016-05-20 11:07:27.000000000 
+0200
+++ new/libteam-1.27/teamd/teamd_lw_nsna_ping.c 2017-05-08 09:55:37.000000000 
+0200
@@ -247,16 +247,16 @@
                return err;
 
        /* check IPV6 header */
-       if (nap.ip6h.ip6_vfc != 0x60 /* IPV6 */ ||
+       if ((nap.ip6h.ip6_vfc & 0xf0) != 0x60 /* IPV6 */ ||
            nap.ip6h.ip6_plen != htons(sizeof(nap) - sizeof(nap.ip6h)) ||
            nap.ip6h.ip6_nxt != IPPROTO_ICMPV6 ||
-           nap.ip6h.ip6_hlim != 255 /* Do not route */ ||
-           memcmp(&nap.ip6h.ip6_src, &nsnap_ppriv->dst.sin6_addr,
-                  sizeof(struct in6_addr)))
+           nap.ip6h.ip6_hlim != 255 /* Do not route */)
                return 0;
 
        /* check ICMP6 header */
        if (nap.nah.nd_na_type != ND_NEIGHBOR_ADVERT ||
+           memcmp(&nap.nah.nd_na_target, &nsnap_ppriv->dst.sin6_addr,
+                  sizeof(struct in6_addr)) ||
            nap.opt.nd_opt_type != ND_OPT_TARGET_LINKADDR ||
            nap.opt.nd_opt_len != 1 /* 8 bytes */)
                return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/teamd/teamd_runner_lacp.c 
new/libteam-1.27/teamd/teamd_runner_lacp.c
--- old/libteam-1.26/teamd/teamd_runner_lacp.c  2016-08-26 10:24:24.000000000 
+0200
+++ new/libteam-1.27/teamd/teamd_runner_lacp.c  2017-05-08 09:55:37.000000000 
+0200
@@ -913,9 +913,10 @@
                state |= INFO_STATE_LACP_ACTIVITY;
        if (lacp_port->lacp->cfg.fast_rate)
                state |= INFO_STATE_LACP_TIMEOUT;
-       if (lacp_port_selected(lacp_port))
-               state |= INFO_STATE_SYNCHRONIZATION;
-       state |= INFO_STATE_COLLECTING | INFO_STATE_DISTRIBUTING;
+       if (lacp_port_selected(lacp_port) &&
+           lacp_port_agg_selected(lacp_port))
+               state |= INFO_STATE_SYNCHRONIZATION |
+                        INFO_STATE_COLLECTING | INFO_STATE_DISTRIBUTING;
        if (lacp_port->state == PORT_STATE_EXPIRED)
                state |= INFO_STATE_EXPIRED;
        if (lacp_port->state == PORT_STATE_DEFAULTED)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/teamd/teamd_runner_loadbalance.c 
new/libteam-1.27/teamd/teamd_runner_loadbalance.c
--- old/libteam-1.26/teamd/teamd_runner_loadbalance.c   2016-05-20 
11:07:27.000000000 +0200
+++ new/libteam-1.27/teamd/teamd_runner_loadbalance.c   2017-03-17 
19:04:54.000000000 +0100
@@ -40,6 +40,15 @@
                              tdport->ifname);
                return err;
        }
+
+       if (!team_is_port_link_up(tdport->team_port)) {
+               err = team_set_port_enabled(ctx->th, tdport->ifindex, false);
+               if (err) {
+                       teamd_log_err("%s: Failed to disable port.",
+                                     tdport->ifname);
+                       return TEAMD_ENOENT(err) ? 0 : err;
+               }
+       }
        return teamd_balancer_port_added(lb->tb, tdport);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libteam-1.26/teamd/teamd_state.c 
new/libteam-1.27/teamd/teamd_state.c
--- old/libteam-1.26/teamd/teamd_state.c        2016-05-20 11:07:27.000000000 
+0200
+++ new/libteam-1.27/teamd/teamd_state.c        2017-03-17 18:41:23.000000000 
+0100
@@ -195,7 +195,7 @@
        char *dot;
 
        if (tdport)
-               ret = asprintf(&path, "$." TEAMD_STATE_PER_PORT_PREFIX "%s%s",
+               ret = asprintf(&path, "$." TEAMD_STATE_PER_PORT_PREFIX 
"\"%s\"%s",
                               tdport->ifname, subpath);
        else
                ret = asprintf(&path, "$%s", subpath);
@@ -296,13 +296,25 @@
 
        if (!strncmp(item_path, TEAMD_STATE_PER_PORT_PREFIX,
                     strlen(TEAMD_STATE_PER_PORT_PREFIX))) {
+               char *ifname_start, *ifname_end;
                struct teamd_port *cur_tdport;
-               char *ifname_start = strchr(item_path, '.') + 1;
-               char *ifname_end = strchr(ifname_start, '.');
-               size_t ifname_len = ifname_end - ifname_start;
+               size_t ifname_len;
+
+               ifname_start = strchr(item_path, '.') + 1;
+               if (*ifname_start == '\"') {
+                       ifname_start++;
+                       ifname_end = strrchr(ifname_start, '\"');
+                       if (!ifname_end)
+                               return -EINVAL;
+                       ifname_len = ifname_end - ifname_start;
+                       ifname_end++;
+               } else {
+                       ifname_end = strchr(ifname_start, '.');
+                       if (!ifname_end)
+                               return -EINVAL;
+                       ifname_len = ifname_end - ifname_start;
+               }
 
-               if (!ifname_end)
-                       return -EINVAL;
                subpath = ifname_end + 1;
 
                teamd_for_each_tdport(cur_tdport, ctx) {

++++++ start_teamd_from_usr_sbin.patch ++++++
Index: libteam-1.16/teamd/redhat/systemd/[email protected]
===================================================================
--- libteam-1.16.orig/teamd/redhat/systemd/[email protected]
+++ libteam-1.16/teamd/redhat/systemd/[email protected]
@@ -3,6 +3,6 @@ Description=Team Daemon for device %I
 
 [Service]
 BusName=org.libteam.teamd.%i
-ExecStart=/usr/bin/teamd -U -D -o -t %i -f /run/teamd/%i.conf
+ExecStart=/usr/sbin/teamd -U -D -o -t %i -f /run/teamd/%i.conf
 Restart=on-failure
 RestartPreventExitStatus=1

Reply via email to