Hello community,

here is the log from the commit of package wicked for openSUSE:Factory checked 
in at 2014-07-24 06:58:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wicked (Old)
 and      /work/SRC/openSUSE:Factory/.wicked.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "wicked"

Changes:
--------
--- /work/SRC/openSUSE:Factory/wicked/wicked.changes    2014-07-21 
10:34:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.wicked.new/wicked.changes       2014-07-24 
06:58:44.000000000 +0200
@@ -1,0 +2,26 @@
+Wed Jul 23 13:22:44 UTC 2014 - m...@suse.de
+
+- version 0.5.37
+- nanny: enabled nanny use for hotplugging (bnc#880515)
+  To disable again in case of trouble, edit /etc/wicked/common.xml
+  and set <use-nanny>false</use-nanny>, restart wickedd.service
+  and execute "wicked ifup all" to start the interfaces directly.
+- ifdown: flush addrs and routes on device-down (bnc#885236)
+- dhcp6: do not break ifdown if release fails (bnc#884012)
+  When the interface is not ready to send out a lease release,
+  commit the lease drop and notify wickedd, so ifdown goes on.
+- ifup: update client-info and client-state on device-ready,
+  do not detect persistance but set if requested only (bnc#876845).
+
+-------------------------------------------------------------------
+Mon Jul 21 18:23:54 UTC 2014 - m...@suse.de
+
+- version 0.5.36
+- ifup/nanny: refresh state data when address event arrives
+  to have complete lease data for status evaluation on timeout
+  (bnc#884012,bnc#876845)
+- nanny: make policy application mechanism aware of children
+  dependency, fixed ifcondition child handling.
+- ibft: enable ipv6, use sysfs prefix-len (bnc#887542)
+
+-------------------------------------------------------------------

Old:
----
  wicked-0.5.35.tar.bz2

New:
----
  wicked-0.5.37.tar.bz2

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

Other differences:
------------------
++++++ wicked.spec ++++++
--- /var/tmp/diff_new_pack.D8PSFs/_old  2014-07-24 06:58:45.000000000 +0200
+++ /var/tmp/diff_new_pack.D8PSFs/_new  2014-07-24 06:58:45.000000000 +0200
@@ -18,7 +18,7 @@
 
 %define                release_prefix  %{?snapshot:%{snapshot}}%{!?snapshot:0}
 Name:           wicked
-Version:        0.5.35
+Version:        0.5.37
 Release:        %{release_prefix}.0.0
 Summary:        Network configuration infrastructure
 License:        GPL-2.0

++++++ wicked-0.5.35.tar.bz2 -> wicked-0.5.37.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/ChangeLog new/wicked-0.5.37/ChangeLog
--- old/wicked-0.5.35/ChangeLog 2014-07-18 12:17:35.000000000 +0200
+++ new/wicked-0.5.37/ChangeLog 2014-07-23 15:15:28.000000000 +0200
@@ -1,9 +1,138 @@
+commit acbfd63626a21200ecc4099cd12ef6b1c3aa75b0
+Author: Marius Tomaschewski <m...@suse.de>
+Date:   Wed Jul 23 15:12:34 2014 +0200
+
+    version 0.5.37
+
+commit 3e3b2cdf72023a66b5dee1091d7c03ddec025882
+Author: Marius Tomaschewski <m...@suse.de>
+Date:   Wed Jul 23 15:06:28 2014 +0200
+
+    nanny: enabled nanny use for hotplugging (bnc#880515)
+    
+    To disable again in case of trouble, edit /etc/wicked/common.xml
+    and set <use-nanny>false</use-nanny>, restart wickedd.service and
+    execute "wicked ifup all" to start the interfaces directly.
+
+commit 0c8ea5a1c9e8e038fd26c9d329b21d9b901e1703
+Author: Marius Tomaschewski <m...@suse.de>
+Date:   Tue Jul 22 21:11:16 2014 +0200
+
+    ifdown: flush addrs and routes on device-down (bnc#885236)
+
+commit 04631b76211a4efc12aaeef7b4ad4fb8570e16f6
+Author: Marius Tomaschewski <m...@suse.de>
+Date:   Tue Jul 22 20:27:27 2014 +0200
+
+    dhcp6: do not break ifdown if release fails (bnc#884012)
+    
+    When the interface is not ready to send out a lease release,
+    commit the lease drop and notify wickedd, so ifdown goes on.
+
+commit c155cb7877859d4a5f10b57589c45b5d4fe6c4cb
+Author: Marius Tomaschewski <m...@suse.de>
+Date:   Tue Jul 22 15:23:37 2014 +0200
+
+    iflist: added utils to refresh addrs/routes only
+
+commit 25560e17c3115e70a77a025486f4acac11e2016b
+Author: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>
+Date:   Tue Jul 22 11:05:36 2014 +0200
+
+    fsm: Update <client-in|statefo> on device-ready event
+
+commit 1e5a1df97e1edbcc9114f2c2a2efca922cd330c3
+Author: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>
+Date:   Tue Jul 22 10:57:45 2014 +0200
+
+    server: set persistent flag only when requested
+
+commit 788d36f5b2cc82bde2c2ce6393e18af4535bb243
+Author: Marius Tomaschewski <m...@suse.de>
+Date:   Mon Jul 21 20:21:14 2014 +0200
+
+    version 0.5.36
+
+commit 5a11b70d08f26b766c17e2be85640a1247b2bc63
+Author: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>
+Date:   Mon Jul 21 15:44:53 2014 +0200
+
+    fsm: always do refresh on NI_EVENT_ADDRESS_ACQUIRED
+
+commit 8d6ad1c36ac92f12b30d8161a9ebfd8b7a632d4a
+Author: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>
+Date:   Mon Jul 21 15:31:56 2014 +0200
+
+    fsm: do refresh when explicitly requested
+
+commit 7f297dfee049ce9bc381e100e2e5d91003d40f5d
+Author: Marius Tomaschewski <m...@suse.de>
+Date:   Mon Jul 21 12:55:12 2014 +0200
+
+    lib: fixed to drop state before deleting netdev
+
+commit 6186147ecb7562c1c2419c664d1787c3cc0f5c1e
+Author: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>
+Date:   Mon Jul 21 11:00:30 2014 +0200
+
+    ifcondition: Fix <child> handling
+    
+    Handle <child> the same way as <and>.
+
+commit fd191999b1499749b22170b2777d2803833ae0cf
+Author: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>
+Date:   Sun Jul 20 12:51:42 2014 +0200
+
+    policy: add extra debug to ifcondition functions
+    
+    NI_LOG_DEBUG2 lvelel needed to enable it.
+
+commit 1445aaf9f93f6097dfa521f03439e74610c8b906
+Author: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>
+Date:   Fri Jul 18 13:08:32 2014 +0200
+
+    fsm: cleanup of ni_fsm_policy_applicable()
+    
+    - move common checks to the caller
+    - removed unnecessary debug messages
+    - cleanup comments
+
+commit 74ac35b7df7b0de63536e4e832fcf47a57454afa
+Author: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>
+Date:   Fri Jul 18 13:06:58 2014 +0200
+
+    fsm: check only given worker's name on <device>
+
+commit 6984caa539ce508f3943351dcfd029dca902588c
+Author: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>
+Date:   Fri Jul 18 13:04:55 2014 +0200
+
+    fsm: change ni_fsm_exists_applicable_policy param
+
+commit fbf3ddb897370cd1322e9bec822a4692dba8dccc
+Author: Pawel Wieczorkiewicz <pwieczorkiew...@suse.de>
+Date:   Fri Jul 18 13:03:29 2014 +0200
+
+    ifup: <match> recursive <child> generation
+
 commit c4a2cf65a55c384009eefddaef4b6571b813fe03
 Author: Marius Tomaschewski <m...@suse.de>
 Date:   Fri Jul 18 11:57:39 2014 +0200
 
     version 0.5.35
 
+commit bb5a528f8824c753ac5fdb4695c9b1176d333963
+Author: Marius Tomaschewski <m...@suse.de>
+Date:   Fri Jul 18 09:40:54 2014 +0200
+
+    ibft: fixed to read variables earlier
+
+commit 97d9e0be5459248ebcd4760e452ab131cce30daf
+Author: Marius Tomaschewski <m...@suse.de>
+Date:   Thu Jul 17 19:59:33 2014 +0200
+
+    ibft: enable ipv6, use sysfs prefix-len (bnc#887542)
+
 commit 32cc7784e5054706429a827ab921015593c62b95
 Author: Marius Tomaschewski <m...@suse.de>
 Date:   Thu Jul 17 19:02:14 2014 +0200
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/VERSION new/wicked-0.5.37/VERSION
--- old/wicked-0.5.35/VERSION   2014-07-18 11:57:30.000000000 +0200
+++ new/wicked-0.5.37/VERSION   2014-07-23 15:12:31.000000000 +0200
@@ -1 +1 @@
-0.5.35
+0.5.37
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/client/ifup.c 
new/wicked-0.5.37/client/ifup.c
--- old/wicked-0.5.35/client/ifup.c     2014-07-18 11:55:21.000000000 +0200
+++ new/wicked-0.5.37/client/ifup.c     2014-07-21 20:28:04.000000000 +0200
@@ -79,11 +79,11 @@
 }
 
 static xml_node_t *
-__ni_ifup_generate_match(ni_ifworker_t *w)
+__ni_ifup_generate_match(const char *name, ni_ifworker_t *w)
 {
        xml_node_t *match;
 
-       if (!(match = xml_node_new(NI_NANNY_IFPOLICY_MATCH, NULL)))
+       if (!(match = xml_node_new(name, NULL)))
                goto error;
 
        if (!__ni_ifup_generate_match_dev(match, w))
@@ -100,11 +100,8 @@
                        ni_ifworker_t *child = w->children.data[i];
                        xml_node_t *cnode;
 
-                       if(!(cnode = 
xml_node_new(NI_NANNY_IFPOLICY_MATCH_COND_CHILD, or)))
-                               goto error;
-
-                       if (!__ni_ifup_generate_match_dev(cnode, child))
-                               goto error;
+                       cnode = 
__ni_ifup_generate_match(NI_NANNY_IFPOLICY_MATCH_COND_CHILD, child);
+                       xml_node_add_child(or ,cnode);
                }
        }
 
@@ -136,7 +133,7 @@
                        w->name, pname);
 
        policy = ni_convert_cfg_into_policy_node(ifcfg,
-                       __ni_ifup_generate_match(w),
+                       __ni_ifup_generate_match(NI_NANNY_IFPOLICY_MATCH, w),
                        pname, w->config.origin);
        ni_string_free(&pname);
        if (!policy) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/configure new/wicked-0.5.37/configure
--- old/wicked-0.5.35/configure 2014-07-18 12:16:56.000000000 +0200
+++ new/wicked-0.5.37/configure 2014-07-23 15:14:38.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for wicked 0.5.35.
+# Generated by GNU Autoconf 2.69 for wicked 0.5.37.
 #
 # Report bugs to <http://bugs.opensuse.org>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='wicked'
 PACKAGE_TARNAME='wicked'
-PACKAGE_VERSION='0.5.35'
-PACKAGE_STRING='wicked 0.5.35'
+PACKAGE_VERSION='0.5.37'
+PACKAGE_STRING='wicked 0.5.37'
 PACKAGE_BUGREPORT='http://bugs.opensuse.org'
 PACKAGE_URL='https://github.com/openSUSE/wicked'
 
@@ -1378,7 +1378,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 wicked 0.5.35 to adapt to many kinds of systems.
+\`configure' configures wicked 0.5.37 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1448,7 +1448,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of wicked 0.5.35:";;
+     short | recursive ) echo "Configuration of wicked 0.5.37:";;
    esac
   cat <<\_ACEOF
 
@@ -1598,7 +1598,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-wicked configure 0.5.35
+wicked configure 0.5.37
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2197,7 +2197,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by wicked $as_me 0.5.35, which was
+It was created by wicked $as_me 0.5.37, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3060,7 +3060,7 @@
 
 # Define the identity of the package.
  PACKAGE='wicked'
- VERSION='0.5.35'
+ VERSION='0.5.37'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14784,7 +14784,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by wicked $as_me 0.5.35, which was
+This file was extended by wicked $as_me 0.5.37, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14851,7 +14851,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-wicked config.status 0.5.35
+wicked config.status 0.5.37
 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/wicked-0.5.35/dhcp6/device.c 
new/wicked-0.5.37/dhcp6/device.c
--- old/wicked-0.5.35/dhcp6/device.c    2014-07-16 09:11:29.000000000 +0200
+++ new/wicked-0.5.37/dhcp6/device.c    2014-07-23 14:58:05.000000000 +0200
@@ -1160,7 +1160,6 @@
 {
        char *rel_uuid = NULL;
        char *our_uuid = NULL;
-       int rv;
 
        if (dev->lease == NULL) {
                ni_error("%s: no lease set", dev->ifname);
@@ -1183,9 +1182,7 @@
                rel_uuid ? " with UUID " : "", rel_uuid ? rel_uuid : "");
        ni_string_free(&rel_uuid);
 
-       if ((rv = ni_dhcp6_fsm_release(dev)) < 0)
-               return rv;
-
+       ni_dhcp6_fsm_release(dev);
        return 0;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/dhcp6/fsm.c 
new/wicked-0.5.37/dhcp6/fsm.c
--- old/wicked-0.5.35/dhcp6/fsm.c       2014-07-04 10:06:36.000000000 +0200
+++ new/wicked-0.5.37/dhcp6/fsm.c       2014-07-23 14:58:05.000000000 +0200
@@ -1448,12 +1448,14 @@
 
        /* When all IA's are expired, just commit a release */
        if (ni_dhcp6_lease_with_active_address(dev->lease)) {
-               return __ni_dhcp6_fsm_release(dev, 0);
+               __ni_dhcp6_fsm_release(dev, 0);
+               return ni_dhcp6_fsm_commit_lease(dev, NULL);
        }
 
        if (dev->config->mode == NI_DHCP6_MODE_INFO) {
                ni_dhcp6_device_drop_lease(dev);
-               return ni_dhcp6_fsm_restart(dev);
+               ni_dhcp6_fsm_restart(dev);
+               return 0;
        } else {
                return ni_dhcp6_fsm_commit_lease(dev, NULL);
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/etc/common.xml.in 
new/wicked-0.5.37/etc/common.xml.in
--- old/wicked-0.5.35/etc/common.xml.in 2014-06-27 16:47:32.000000000 +0200
+++ new/wicked-0.5.37/etc/common.xml.in 2014-07-23 15:06:09.000000000 +0200
@@ -6,4 +6,8 @@
 
   <dbus name="org.opensuse.Network" />
   <schema name="@wicked_schemadir@/wicked.xml"/>
+
+  <!-- Set to 'false' to disable nanny use and
+       apply the config directly into wickedd -->
+  <use-nanny>true</use-nanny>
 </config>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/extensions/ibft 
new/wicked-0.5.37/extensions/ibft
--- old/wicked-0.5.35/extensions/ibft   2014-07-18 11:17:23.000000000 +0200
+++ new/wicked-0.5.37/extensions/ibft   2014-07-22 11:30:08.000000000 +0200
@@ -158,6 +158,7 @@
        err_name="$err_base/$ibft_nic"
 
        nic_flags=`ibft_getattr "$nicpath/flags"`
+       # Check for valid NIC block
        [ -n "$nic_flags" ] && ((nic_flags & 0x01)) || continue
 
        devpath=`do_readlink -f $nicpath/device`
@@ -184,32 +185,39 @@
                continue
        fi
 
-       nic_ipaddr=`ibft_getattr "$nicpath/ip-addr"`
-       nic_prefixlen=""
-
-       # The kernel AFAIS currently supports only IPv4:
-       # it always converts the iBFT "Subnet Mask Prefix"
-       # byte (the prefix length) into a IPv4 netmask ...
-       netmask=`ibft_getattr "$nicpath/subnet-mask"`
-       case "$netmask" in
-       *.*.*.*)
-               nic_prefixlen=`netmask2pfxlen "$netmask" 2>/dev/null`
-               ;;
-       *)
-               nic_prefixlen="$netmask"
-               ;;
-       esac
-       [ -n "$nic_prefixlen" ] || continue
-
        # Enum: Other,Manual,WellKnown,Dhcp,RouterAdv
        # Note: kvm/gPXE is using 0, even it is from dhcp
        nic_origin=`ibft_getattr "$nicpath/origin"`
+       nic_ipaddr=`ibft_getattr "$nicpath/ip-addr"`
+       nic_prefixlen=$(ibft_getattr "$nicpath/prefix-len")
        nic_dhcp_server=`ibft_getattr "$nicpath/dhcp"`
        nic_gateway=`ibft_getattr "$nicpath/gateway"`
        nic_dns_server1=`ibft_getattr "$nicpath/primary-dns"`
        nic_dns_server2=`ibft_getattr "$nicpath/secondary-dns"`
        nic_hostname=`ibft_getattr "$nicpath/hostname"`
 
+       case "$nic_ipaddr" in
+       *.*.*.*)
+               nic_family="ipv4"
+               if [ -z "$nic_prefixlen" ] ; then
+                       # Older kernel iBFT support isn't IPv6 aware
+                       # and always converts the iBFT prefix length
+                       # byte into dotted-decimal ipv4 subnet-mask.
+                       netmask=`ibft_getattr "$nicpath/subnet-mask"`
+                       nic_prefixlen=`netmask2pfxlen "$netmask" 2>/dev/null`
+               fi
+               ;;
+       *:*)
+               nic_family="ipv6"
+               ;;
+       esac
+       [ -n "$nic_family" ] || continue
+       if [ $nic_origin -ne 3 -a -n "$nic_ipaddr" ] ; then
+               # we need a prefix length for static setup
+               [ -n "$nic_prefixlen"    ] || continue
+               [ "$nic_prefixlen" = "0" ] && continue
+       fi
+
        cat <<-EOF
        <interface>
          <name namespace="ifindex">$nic_ifindex</name>
@@ -273,20 +281,21 @@
                fi
 
                cat <<-EOF
-                 <ipv4:static>
+                 <$nic_family:static>
                    <address><local>$nic_ipaddr/$nic_prefixlen</local></address>
                    $default_route
                    $dns_servers
                    $host_name
-                 </ipv4:static>
+                 </$nic_family:static>
                EOF
        fi
        if [ -n "$nic_dhcp_server" -o "$nic_origin" -eq 3 ] ; then
-               # Default to DHCPv4 -- no root-path defined for DHCPv6.
+               # Note: There is currently no root-path option
+               #       defined for DHCPv6 in any RFC...
                cat <<-EOF
-                 <ipv4:dhcp>
+                 <$nic_family:dhcp>
                    <enabled>true</enabled>
-                 </ipv4:dhcp>
+                 </$nic_family:dhcp>
                EOF
        fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/include/wicked/fsm.h 
new/wicked-0.5.37/include/wicked/fsm.h
--- old/wicked-0.5.35/include/wicked/fsm.h      2014-07-16 09:11:29.000000000 
+0200
+++ new/wicked-0.5.37/include/wicked/fsm.h      2014-07-23 12:00:27.000000000 
+0200
@@ -257,7 +257,7 @@
 extern ni_bool_t               ni_fsm_policy_remove(ni_fsm_t *, 
ni_fsm_policy_t *);
 extern unsigned int            ni_fsm_policy_get_applicable_policies(ni_fsm_t 
*, ni_ifworker_t *,
                                                const ni_fsm_policy_t **, 
unsigned int);
-extern ni_bool_t               ni_fsm_exists_applicable_policy(ni_fsm_t *, 
ni_ifworker_t *);
+extern ni_bool_t               ni_fsm_exists_applicable_policy(ni_fsm_policy_t 
*, ni_ifworker_t *);
 extern xml_node_t *            ni_fsm_policy_transform_document(xml_node_t *, 
const ni_fsm_policy_t * const *, unsigned int);
 extern const char *            ni_fsm_policy_name(const ni_fsm_policy_t *);
 extern xml_location_t *        ni_fsm_policy_location(const ni_fsm_policy_t *);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/nanny/nanny.c 
new/wicked-0.5.37/nanny/nanny.c
--- old/wicked-0.5.35/nanny/nanny.c     2014-07-16 09:11:29.000000000 +0200
+++ new/wicked-0.5.37/nanny/nanny.c     2014-07-23 14:48:22.000000000 +0200
@@ -433,7 +433,7 @@
                        mdev->allowed? ", user control allowed" : "",
                        mdev->monitor? ", monitored (auto-enabled)" : "");
 
-       if (ni_fsm_exists_applicable_policy(mgr->fsm, w))
+       if (ni_fsm_exists_applicable_policy(mgr->fsm->policies, w))
                ni_nanny_schedule_recheck(&mgr->recheck, w);
 
        ni_ifworker_set_progress_callback(w, ni_managed_device_progress, mdev);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/src/fsm-policy.c 
new/wicked-0.5.37/src/fsm-policy.c
--- old/wicked-0.5.35/src/fsm-policy.c  2014-07-16 09:11:29.000000000 +0200
+++ new/wicked-0.5.37/src/fsm-policy.c  2014-07-23 12:00:27.000000000 +0200
@@ -372,27 +372,18 @@
        xml_node_t *node;
        char *pname;
 
-       if (!ni_ifpolicy_name_is_valid(policy->name)) {
-               ni_error("policy with invalid name");
+       if (!policy || !w)
                return FALSE;
-       }
-
-       if (!policy->match || policy->type != NI_IFPOLICY_TYPE_CONFIG) {
-               ni_error("wrong type or no match for policy %s", policy->name);
-               return FALSE;
-       }
 
-       /* 1st match   check - ifworker to policy name comparison */
+       /* 1st match check -ifworker to policy name comparison */
        pname = ni_ifpolicy_name_from_ifname(w->name);
        if (!ni_string_eq(policy->name, pname)) {
-               ni_debug_nanny("%s: policy name indicates different device than 
%s",
-                               policy->name, w->name);
                ni_string_free(&pname);
                return FALSE;
        }
        ni_string_free(&pname);
 
-       /* 2nd  match check -  ifworker  to config name comparison */
+       /* 2nd match check - ifworker  to config name comparison */
        if (w->config.node && (node = xml_node_get_child(w->config.node, 
"name"))) {
                const char *namespace = xml_node_get_attr(node, "namespace");
                if (!namespace && !ni_string_eq(node->cdata, w->name)) {
@@ -402,8 +393,15 @@
                }
        }
 
-       /* 2nd match check - <match> condition must be fulfilled */
-       return ni_ifcondition_check(policy->match, w);
+       /* 3rd match check - <match> condition must be fulfilled */
+       if (!ni_ifcondition_check(policy->match, w)) {
+               ni_debug_nanny("%s: policy <match> condition is not met for 
worker %s",
+                       policy->name, w->name);
+               return FALSE;
+       }
+
+       ni_debug_nanny("%s: found applicable policy: %s", w->name, 
policy->name);
+       return TRUE;
 }
 
 /*
@@ -450,6 +448,21 @@
                return 0;
 
        for (policy = fsm->policies; policy; policy = policy->next) {
+               if (!ni_ifpolicy_name_is_valid(policy->name)) {
+                       ni_error("policy with invalid name %s", policy->name);
+                       continue;
+               }
+
+               if (policy->type != NI_IFPOLICY_TYPE_CONFIG) {
+                       ni_error("policy %s: wrong type %d", policy->name, 
policy->type);
+                       continue;
+               }
+
+               if (!policy->match) {
+                       ni_error("policy %s: no valid <match>", policy->name);
+                       continue;
+               }
+
                if (ni_fsm_policy_applicable(policy, w)) {
                        if (count < max)
                                result[count++] = policy;
@@ -461,15 +474,16 @@
 }
 
 ni_bool_t
-ni_fsm_exists_applicable_policy(ni_fsm_t *fsm, ni_ifworker_t *w)
+ni_fsm_exists_applicable_policy(ni_fsm_policy_t *list, ni_ifworker_t *w)
 {
        ni_fsm_policy_t *policy;
 
-       if (fsm && w) {
-               for (policy = fsm->policies; policy; policy = policy->next) {
-                       if (ni_fsm_policy_applicable(policy, w))
-                               return TRUE;
-               }
+       if (!list || !w)
+               return FALSE;
+
+       for (policy = list; policy; policy = policy->next) {
+               if (ni_fsm_policy_applicable(policy, w))
+                       return TRUE;
        }
 
        return FALSE;
@@ -1103,25 +1117,38 @@
 static ni_bool_t
 __ni_fsm_policy_match_and_check(const ni_ifcondition_t *cond, ni_ifworker_t *w)
 {
-       return ni_ifcondition_check(cond->args.terms.left, w)
+       ni_bool_t rv;
+
+       rv = ni_ifcondition_check(cond->args.terms.left, w)
            && ni_ifcondition_check(cond->args.terms.right, w);
+
+       if (ni_debug_guard(NI_LOG_DEBUG2, NI_TRACE_IFCONFIG)) {
+               ni_trace("%s: %s condition is %s",
+                       w->name, __func__, ni_format_boolean(rv));
+       }
+       return rv;
+
 }
 
 static ni_bool_t
 __ni_fsm_policy_match_and_children_check(const ni_ifcondition_t *cond, 
ni_ifworker_t *w)
 {
        unsigned int i;
+       ni_bool_t rv = FALSE;
 
        for (i = 0; i < w->children.count; i++) {
                ni_ifworker_t *child = w->children.data[i];
 
-               if (ni_ifcondition_check(cond->args.terms.left, child) &&
-                   ni_ifcondition_check(cond->args.terms.right, child)) {
-                       return TRUE;
-               }
+               rv = ni_ifcondition_check(cond->args.terms.left, child);
+               if (rv)
+                       break;
        }
 
-       return FALSE;
+       if (ni_debug_guard(NI_LOG_DEBUG2, NI_TRACE_IFCONFIG)) {
+               ni_trace("%s: %s condition is %s",
+                       w->name, __func__, ni_format_boolean(rv));
+       }
+       return rv;
 }
 
 static ni_ifcondition_t *
@@ -1139,7 +1166,18 @@
 static ni_ifcondition_t *
 ni_ifcondition_and_child(xml_node_t *node)
 {
-       return ni_ifcondition_term2(node, 
__ni_fsm_policy_match_and_children_check);
+       ni_ifcondition_t *and;
+
+       if (node->children == NULL) {
+               ni_error("%s: <%s> condition must not be empty",
+                               xml_node_location(node), node->name);
+               return NULL;
+       }
+
+       if (!(and = ni_ifcondition_and(node)))
+               return NULL;
+
+       return 
ni_ifcondition_new_terms(__ni_fsm_policy_match_and_children_check, and, NULL);
 }
 
 /*
@@ -1152,8 +1190,16 @@
 static ni_bool_t
 __ni_fsm_policy_match_or_check(const ni_ifcondition_t *cond, ni_ifworker_t *w)
 {
-       return ni_ifcondition_check(cond->args.terms.left, w)
+       ni_bool_t rv;
+
+       rv = ni_ifcondition_check(cond->args.terms.left, w)
            || ni_ifcondition_check(cond->args.terms.right, w);
+
+       if (ni_debug_guard(NI_LOG_DEBUG2, NI_TRACE_IFCONFIG)) {
+               ni_trace("%s: %s condition is %s",
+                       w->name, __func__, ni_format_boolean(rv));
+       }
+       return rv;
 }
 
 static ni_ifcondition_t *
@@ -1224,7 +1270,16 @@
 static ni_bool_t
 __ni_fsm_policy_match_class_check(const ni_ifcondition_t *cond, ni_ifworker_t 
*w)
 {
-       return w->object && ni_dbus_class_is_subclass(cond->args.class, 
w->object->class);
+       ni_bool_t rv;
+
+       rv = w->object &&
+               ni_dbus_class_is_subclass(cond->args.class, w->object->class);
+
+       if (ni_debug_guard(NI_LOG_DEBUG2, NI_TRACE_IFCONFIG)) {
+               ni_trace("%s: %s condition is %s",
+                       w->name, __func__, ni_format_boolean(rv));
+       }
+       return rv;
 }
 
 static ni_ifcondition_t *
@@ -1298,7 +1353,15 @@
 static ni_bool_t
 __ni_fsm_policy_match_device_name_check(const ni_ifcondition_t *cond, 
ni_ifworker_t *w)
 {
-       return ni_ifworker_match_netdev_name(w, cond->args.string);
+       ni_bool_t rv;
+
+       rv = ni_ifworker_match_netdev_name(w, cond->args.string);
+
+       if (ni_debug_guard(NI_LOG_DEBUG2, NI_TRACE_IFCONFIG)) {
+               ni_trace("%s: %s condition is %s",
+                       w->name, __func__, ni_format_boolean(rv));
+       }
+       return rv;
 }
 static ni_bool_t
 __ni_fsm_policy_match_device_alias_check(const ni_ifcondition_t *cond, 
ni_ifworker_t *w)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/src/fsm.c new/wicked-0.5.37/src/fsm.c
--- old/wicked-0.5.35/src/fsm.c 2014-07-18 11:55:21.000000000 +0200
+++ new/wicked-0.5.37/src/fsm.c 2014-07-23 14:58:05.000000000 +0200
@@ -771,8 +771,6 @@
 ni_bool_t
 ni_ifworker_match_netdev_name(const ni_ifworker_t *w, const char *ifname)
 {
-       unsigned int i;
-
        if (!w || ni_string_empty(ifname))
                return FALSE;
 
@@ -783,18 +781,7 @@
        if (ni_string_eq(w->name, ifname))
                return TRUE;
 
-       ni_debug_nanny("policy matches against dependency device");
-
-       /* Check for presence of mandatory child ifworker */
-       for (i = 0; i < w->children.count; i++) {
-               ni_ifworker_t *child = w->children.data[i];
-
-               if (ni_string_eq(child->name, ifname))
-                       return TRUE;
-       }
-
        ni_error("device %s requested via match is not present", ifname);
-
        return FALSE;
 }
 
@@ -1176,15 +1163,15 @@
                if (w->fsm.wait_for && w->fsm.wait_for->next_state == new_state)
                        w->fsm.wait_for = NULL;
 
-               if (w->target_state == new_state) {
-                       if (w->object && !w->readonly) {
-                               if (prev_state < new_state)
-                                       ni_ifworker_update_client_state(w);
-                               if (new_state != NI_FSM_STATE_DEVICE_DOWN)
-                                       ni_ifworker_update_client_info(w);
-                       }
-                       ni_ifworker_success(w);
+               if (new_state == NI_FSM_STATE_DEVICE_READY &&
+                   w->object && !w->readonly) {
+                       if (prev_state < new_state)
+                               ni_ifworker_update_client_state(w);
+                       ni_ifworker_update_client_info(w);
                }
+
+               if (w->target_state == new_state)
+                       ni_ifworker_success(w);
        }
 }
 
@@ -2899,7 +2886,7 @@
        ni_netdev_t *dev = ni_objectmodel_unwrap_netif(object, NULL);
        ni_ifworker_t *found = NULL;
 
-       if ((dev == NULL || dev->name == NULL) && refresh) {
+       if (dev == NULL || dev->name == NULL || refresh) {
                if (!ni_dbus_object_refresh_children(object)) {
                        ni_error("%s: failed to refresh netdev object", 
object->path);
                        return NULL;
@@ -3877,23 +3864,21 @@
 static ni_bool_t
 address_acquired_callback_handler(ni_ifworker_t *w, const 
ni_objectmodel_callback_info_t *cb, ni_event_t event, ni_fsm_t *fsm, const char 
*object_path)
 {
-       ni_netdev_t *dev = w && cb ? w->device : NULL;
+       ni_netdev_t *dev;
        ni_addrconf_lease_t *lease;
        ni_addrconf_lease_t *other;
        ni_stringbuf_t buf = NI_STRINGBUF_INIT_DYNAMIC;
 
-       if (!dev) {
-               w = ni_fsm_recv_new_netif_path(fsm, object_path);
-               if (w && cb) {
-                       dev = w->device;
-
-                       /* Rebuild hierarchy */
-                       ni_fsm_refresh_master_dev(fsm, w);
-                       ni_fsm_refresh_lower_dev(fsm, w);
-               }
-               else
-                       return FALSE;
+       w = ni_fsm_recv_new_netif_path(fsm, object_path);
+       if (w && cb) {
+               dev = w->device;
+
+               /* Rebuild hierarchy */
+               ni_fsm_refresh_master_dev(fsm, w);
+               ni_fsm_refresh_lower_dev(fsm, w);
        }
+       else
+               return FALSE;
 
        switch (event) {
        case NI_EVENT_ADDRESS_ACQUIRED:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/src/ifconfig.c 
new/wicked-0.5.37/src/ifconfig.c
--- old/wicked-0.5.35/src/ifconfig.c    2014-07-18 11:55:21.000000000 +0200
+++ new/wicked-0.5.37/src/ifconfig.c    2014-07-23 14:58:05.000000000 +0200
@@ -138,6 +138,10 @@
                        ni_error("unable to shut down interface %s", dev->name);
                        return -1;
                }
+
+               /* link is down, remove all addrs and routes */
+               __ni_system_interface_flush_addrs(NULL, dev);
+               __ni_system_interface_flush_routes(NULL, dev);
        }
 
        __ni_global_seqno++;
@@ -147,6 +151,46 @@
 }
 
 int
+__ni_system_interface_flush_addrs(ni_netconfig_t *nc, ni_netdev_t *dev)
+{
+       ni_address_t *ap;
+
+        if (!dev || (!nc && !(nc = ni_global_state_handle(0))))
+                return -1;
+
+        /* TODO: ni_rtnl_query_addr_info + del without to parse */
+       __ni_system_refresh_interface_addrs(nc, dev);
+       for (ap = dev->addrs; ap; ap = ap->next) {
+               __ni_rtnl_send_deladdr(dev, ap);
+       }
+       __ni_system_refresh_interface_addrs(nc, dev);
+       return dev->addrs == NULL ? 0 : 1;
+}
+
+int
+__ni_system_interface_flush_routes(ni_netconfig_t *nc, ni_netdev_t *dev)
+{
+       ni_route_table_t *tab;
+       ni_route_t *rp;
+        unsigned int i;
+
+        if (!dev || (!nc && !(nc = ni_global_state_handle(0))))
+                return -1;
+
+        /* TODO: ni_rtnl_query_route_info + del without to parse */
+        __ni_system_refresh_interface_routes(nc, dev);
+        for (tab = dev->routes; tab; tab = tab->next) {
+                for (i = 0; i < tab->routes.count; ++i) {
+                       if (!(rp = tab->routes.data[i]))
+                               continue;
+                       __ni_rtnl_send_delroute(dev, rp);
+               }
+        }
+        __ni_system_refresh_interface_routes(nc, dev);
+        return dev->routes == NULL ? 0 : 1;
+}
+
+int
 ni_system_interface_link_monitor(ni_netdev_t *dev)
 {
        int rv;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/src/ifevent.c 
new/wicked-0.5.37/src/ifevent.c
--- old/wicked-0.5.35/src/ifevent.c     2014-07-17 09:51:44.000000000 +0200
+++ new/wicked-0.5.37/src/ifevent.c     2014-07-23 14:48:22.000000000 +0200
@@ -179,8 +179,8 @@
        if (!__ni_netdev_still_exists(ifi->ifi_index)) {
                if (old) {
                        __ni_netdev_event(nc, old, NI_EVENT_DEVICE_DELETE);
-                       ni_netconfig_device_remove(nc, old);
                        ni_client_state_drop(old->link.ifindex);
+                       ni_netconfig_device_remove(nc, old);
                        return 0;
                }
                return -1;
@@ -295,9 +295,8 @@
 
                __ni_netdev_event(nc, dev, NI_EVENT_DEVICE_DELETE);
 
-               ni_netconfig_device_remove(nc, dev);
-
                ni_client_state_drop(dev->link.ifindex);
+               ni_netconfig_device_remove(nc, dev);
        }
 
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/src/iflist.c 
new/wicked-0.5.37/src/iflist.c
--- old/wicked-0.5.35/src/iflist.c      2014-07-18 11:55:21.000000000 +0200
+++ new/wicked-0.5.37/src/iflist.c      2014-07-23 14:58:05.000000000 +0200
@@ -209,6 +209,20 @@
        return NULL;
 }
 
+static int
+ni_rtnl_query_addr_info(struct ni_rtnl_query *q, unsigned int ifindex)
+{
+       memset(q, 0, sizeof(*q));
+       q->ifindex = ifindex;
+
+       if (__ni_rtnl_query(&q->addr_info, AF_UNSPEC, RTM_GETADDR) < 0) {
+               ni_rtnl_query_destroy(q);
+               return -1;
+       }
+
+       return 0;
+}
+
 static inline struct ifaddrmsg *
 ni_rtnl_query_next_addr_info(struct ni_rtnl_query *q, struct nlmsghdr **hp)
 {
@@ -227,6 +241,20 @@
        return NULL;
 }
 
+static int
+ni_rtnl_query_route_info(struct ni_rtnl_query *q, unsigned int ifindex)
+{
+       memset(q, 0, sizeof(*q));
+       q->ifindex = ifindex;
+
+       if (__ni_rtnl_query(&q->route_info, AF_UNSPEC, RTM_GETROUTE) < 0) {
+               ni_rtnl_query_destroy(q);
+               return -1;
+       }
+
+       return 0;
+}
+
 static inline struct rtmsg *
 ni_rtnl_query_next_route_info(struct ni_rtnl_query *q, struct nlmsghdr **hp, 
unsigned int *oif_idxp)
 {
@@ -394,6 +422,7 @@
                if (dev->seq != seqno) {
                        *tail = dev->next;
                        if (del_list == NULL) {
+                               ni_client_state_drop(dev->link.ifindex);
                                ni_netdev_put(dev);
                        } else {
                                dev->next = NULL;
@@ -469,6 +498,73 @@
 }
 
 /*
+ * Refresh addresses
+ */
+int
+__ni_system_refresh_interface_addrs(ni_netconfig_t *nc, ni_netdev_t *dev)
+{
+       struct ni_rtnl_query query;
+       struct nlmsghdr *h;
+       int res = -1;
+
+       __ni_global_seqno++;
+
+       if (ni_rtnl_query_addr_info(&query, dev->link.ifindex) < 0)
+               goto failed;
+
+       ni_netdev_clear_addresses(dev);
+       while (1) {
+               struct ifaddrmsg *ifa;
+
+               if (!(ifa = ni_rtnl_query_next_addr_info(&query, &h)))
+                       break;
+
+               if (__ni_netdev_process_newaddr(dev, h, ifa) < 0)
+                       ni_error("Problem parsing RTM_NEWADDR message for %s", 
dev->name);
+       }
+
+       res = 0;
+
+failed:
+       ni_rtnl_query_destroy(&query);
+       return res;
+}
+
+/*
+ * Refresh routes
+ */
+int
+__ni_system_refresh_interface_routes(ni_netconfig_t *nc, ni_netdev_t *dev)
+{
+       struct ni_rtnl_query query;
+       struct nlmsghdr *h;
+       int res = -1;
+
+       __ni_global_seqno++;
+
+       if (ni_rtnl_query_route_info(&query, dev->link.ifindex) < 0)
+               goto failed;
+
+       ni_netdev_clear_routes(dev);
+       while (1) {
+               struct rtmsg *rtm;
+
+               if (!(rtm = ni_rtnl_query_next_route_info(&query, &h, NULL)))
+                       break;
+
+               if (__ni_netdev_process_newroute(dev, h, rtm, nc) < 0)
+                       ni_error("Problem parsing RTM_NEWROUTE message");
+       }
+
+       res = 0;
+
+failed:
+       ni_rtnl_query_destroy(&query);
+       return res;
+}
+
+
+/*
  * Refresh the link info of one interface
  */
 int
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/src/netdev.c 
new/wicked-0.5.37/src/netdev.c
--- old/wicked-0.5.35/src/netdev.c      2014-07-16 09:11:29.000000000 +0200
+++ new/wicked-0.5.37/src/netdev.c      2014-07-23 14:58:05.000000000 +0200
@@ -601,8 +601,6 @@
                state = NI_FSM_STATE_LINK_UP;
 
        cs = ni_client_state_new(state);
-       NI_CLIENT_STATE_SET_CONTROL_FLAG(cs->persistent,
-                       state >= NI_FSM_STATE_LINK_UP, TRUE);
 
        ni_netdev_set_client_state(dev, cs);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/src/netinfo_priv.h 
new/wicked-0.5.37/src/netinfo_priv.h
--- old/wicked-0.5.35/src/netinfo_priv.h        2014-07-17 09:51:44.000000000 
+0200
+++ new/wicked-0.5.37/src/netinfo_priv.h        2014-07-23 14:58:05.000000000 
+0200
@@ -59,11 +59,15 @@
 extern int             __ni_system_refresh_all(ni_netconfig_t *nc, ni_netdev_t 
**del_list);
 extern int             __ni_system_refresh_interfaces(ni_netconfig_t *nc);
 extern int             __ni_system_refresh_interface(ni_netconfig_t *, 
ni_netdev_t *);
+extern int             __ni_system_refresh_interface_addrs(ni_netconfig_t *, 
ni_netdev_t *);
+extern int             __ni_system_refresh_interface_routes(ni_netconfig_t *, 
ni_netdev_t *);
 extern int             __ni_device_refresh_link_info(ni_netconfig_t *, 
ni_linkinfo_t *);
 extern int             __ni_device_refresh_ipv6_link_info(ni_netconfig_t *, 
ni_netdev_t *);
 extern int             __ni_system_interface_configure(ni_netconfig_t *, 
ni_netdev_t *, const ni_netdev_t *);
 extern int             __ni_system_interface_delete(ni_netconfig_t *, const 
char *);
 extern int             __ni_system_interface_stats_refresh(ni_netconfig_t *, 
ni_netdev_t *);
+extern int             __ni_system_interface_flush_addrs(ni_netconfig_t *, 
ni_netdev_t *);
+extern int             __ni_system_interface_flush_routes(ni_netconfig_t *, 
ni_netdev_t *);
 extern int             __ni_system_ethernet_refresh(ni_netdev_t *);
 extern int             __ni_system_ethernet_update(ni_netdev_t *, const 
ni_ethernet_t *);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.35/wicked.spec 
new/wicked-0.5.37/wicked.spec
--- old/wicked-0.5.35/wicked.spec       2014-07-18 12:17:02.000000000 +0200
+++ new/wicked-0.5.37/wicked.spec       2014-07-23 15:14:46.000000000 +0200
@@ -18,7 +18,7 @@
 
 %define                release_prefix  %{?snapshot:%{snapshot}}%{!?snapshot:0}
 Name:           wicked
-Version:        0.5.35
+Version:        0.5.37
 Release:        %{release_prefix}.0.0
 Summary:        Network configuration infrastructure
 License:        GPL-2.0

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to