Hello community,

here is the log from the commit of package wicked for openSUSE:Factory checked 
in at 2014-06-02 07:02:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-05-22 
20:39:12.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.wicked.new/wicked.changes       2014-06-02 
07:02:56.000000000 +0200
@@ -1,0 +2,19 @@
+Wed May 28 19:09:54 UTC 2014 - [email protected]
+
+- version 0.5.27
+- server: do not apply multiple equal priority (merics) routes
+  to the same destination (bnc#879842)
+- compat: pass DHCLIENT_ROUTE_PRIORITY suse ifcfg variable to
+  the backend allowing to set custom mertics on dhcp4 routes
+  (bnc#879842)
+- dhcp4: set protocol dhcp hint to all routes, strip domain
+  when sending a hostname option to not break ddns updates
+- hostname: reload syslog after change (bnc#874161)
+- dbus: do not close shared connections (bnc#880124)
+- ipv4: new default to send gratuitous arp
+  Consider new suse ifcfg variable default SEND_GRATUITOUS_ARP=auto
+  for arp-notify, enabling to send gratuitous arp by default, when
+  duplicate IPv4 check is enabled via arp-verify/CHECK_DUPLICATE_IP
+  and the check were successful (bnc#879911,fate#314399).
+
+-------------------------------------------------------------------

Old:
----
  wicked-0.5.26.tar.bz2

New:
----
  wicked-0.5.27.tar.bz2

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

Other differences:
------------------
++++++ wicked.spec ++++++
--- /var/tmp/diff_new_pack.zTXrsb/_old  2014-06-02 07:02:57.000000000 +0200
+++ /var/tmp/diff_new_pack.zTXrsb/_new  2014-06-02 07:02:57.000000000 +0200
@@ -18,7 +18,7 @@
 
 %define                release_prefix  %{?snapshot:%{snapshot}}%{!?snapshot:0}
 Name:           wicked
-Version:        0.5.26
+Version:        0.5.27
 Release:        %{release_prefix}.0.0
 Summary:        Network configuration infrastructure
 License:        GPL-2.0

++++++ wicked-0.5.26.tar.bz2 -> wicked-0.5.27.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/ChangeLog new/wicked-0.5.27/ChangeLog
--- old/wicked-0.5.26/ChangeLog 2014-05-22 11:12:40.000000000 +0200
+++ new/wicked-0.5.27/ChangeLog 2014-05-28 21:19:10.000000000 +0200
@@ -1,3 +1,80 @@
+commit 2e25824ce55b62fba86990b74340b87c79275eb9
+Author: Marius Tomaschewski <[email protected]>
+Date:   Wed May 28 21:17:13 2014 +0200
+
+    version 0.5.27
+
+commit 2f226e8b7329860d1d93d5dbf49dca5c67831d4c
+Author: Marius Tomaschewski <[email protected]>
+Date:   Wed May 28 20:58:16 2014 +0200
+
+    server: do not apply duplicate routes (bnc#879842)
+
+commit 5ef4128328fdc10f06fd825e2638af003e672363
+Author: Marius Tomaschewski <[email protected]>
+Date:   Wed May 28 20:51:59 2014 +0200
+
+    routes: added equal destination/gateway utilities
+
+commit 93a8d1fb917f4ef3ba71cc1f1646b4acbe529988
+Author: Marius Tomaschewski <[email protected]>
+Date:   Wed May 28 15:02:26 2014 +0200
+
+    addrconf: added a lease priority function
+
+commit c045dcdb82c17510ea2cb20d8c1b710dadc947e4
+Author: Marius Tomaschewski <[email protected]>
+Date:   Tue May 27 20:36:09 2014 +0200
+
+    dhcp4: set a protocol dhcp hint to all routes
+
+commit 171baf31096432ce6ef9abd41bd59adb566f7f3f
+Author: Marius Tomaschewski <[email protected]>
+Date:   Tue May 27 16:10:47 2014 +0200
+
+    compat: apply DHCLIENT_ROUTE_PRIORITY (bnc#879842)
+
+commit 5d02fe968721d215dada2a42cda891b9aedf5432
+Author: Marius Tomaschewski <[email protected]>
+Date:   Wed May 28 12:50:08 2014 +0200
+
+    hostname: reload syslog after change (bnc#874161)
+
+commit 991619c0cf1a0a69b6869b8ce49be3c8971f438c
+Author: Marius Tomaschewski <[email protected]>
+Date:   Wed May 28 12:19:24 2014 +0200
+
+    dbus: do not close shared connections (bnc#880124)
+
+commit 751487c245f36c86b04ba03d167145fa3a42de43
+Author: Marius Tomaschewski <[email protected]>
+Date:   Wed May 28 12:02:04 2014 +0200
+
+    ifconfig: fix for an unitialized error return code
+
+commit a5f0f950806ac3fa9c6aec0da3f6cf5edd70f474
+Author: Marius Tomaschewski <[email protected]>
+Date:   Wed May 28 11:58:37 2014 +0200
+
+    arp: no verify/notify if not applicable for device
+
+commit 6b7e9a54bf9fe98658aa4366fd849abec76ac26a
+Author: Marius Tomaschewski <[email protected]>
+Date:   Wed May 28 10:22:05 2014 +0200
+
+    ipv4: new default to send gratuitous arp
+    
+    Consider new suse ifcfg variable default SEND_GRATUITOUS_ARP=auto
+    for arp-notify, enabling to send gratuitous arp by default, when
+    duplicate IPv4 check is enabled via arp-verify/CHECK_DUPLICATE_IP
+    and the check were successful (bnc#879911,fate#314399).
+
+commit 13d9e0a6101bd4fcd1cf37fb539449682ce13efd
+Author: Marius Tomaschewski <[email protected]>
+Date:   Mon May 26 12:01:56 2014 +0200
+
+    dhcp4: strip domain when sending a hostname option
+
 commit a7d861fa2ae7148fd342865bad316fc260aad0f8
 Author: Marius Tomaschewski <[email protected]>
 Date:   Thu May 22 11:10:32 2014 +0200
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/VERSION new/wicked-0.5.27/VERSION
--- old/wicked-0.5.26/VERSION   2014-05-22 11:04:40.000000000 +0200
+++ new/wicked-0.5.27/VERSION   2014-05-28 21:17:00.000000000 +0200
@@ -1 +1 @@
-0.5.26
+0.5.27
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/client/arputil.c 
new/wicked-0.5.27/client/arputil.c
--- old/wicked-0.5.26/client/arputil.c  2014-05-15 14:14:28.000000000 +0200
+++ new/wicked-0.5.27/client/arputil.c  2014-05-28 21:09:26.000000000 +0200
@@ -165,19 +165,12 @@
                return NI_LSB_RC_ERROR;
        }
 
-       switch (dev->link.hwaddr.type) {
-       case ARPHRD_ETHER:
-               if (!ni_netdev_link_is_up(dev)) {
-                       ni_error("%s: link is not up", dev->name);
-                       return NI_LSB_RC_ERROR;
-               }
-               if (!(dev->link.ifflags & 
(NI_IFF_ARP_ENABLED|NI_IFF_BROADCAST_ENABLED))) {
-                       ni_error("%s: arp and broadcasts are disabled", 
dev->name);
-                       return NI_LSB_RC_ERROR;
-               }
-               break;
-       default:
-               ni_error("%s: unsupported interface type", dev->name);
+       if (!ni_netdev_supports_arp(dev)) {
+               ni_error("%s: arp is not supported/enabled", dev->name);
+               return NI_LSB_RC_ERROR;
+       }
+       if (!ni_netdev_link_is_up(dev)) {
+               ni_error("%s: link is not up", dev->name);
                return NI_LSB_RC_ERROR;
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/client/compat.c 
new/wicked-0.5.27/client/compat.c
--- old/wicked-0.5.26/client/compat.c   2014-05-22 07:41:43.000000000 +0200
+++ new/wicked-0.5.27/client/compat.c   2014-05-28 21:09:26.000000000 +0200
@@ -1098,6 +1098,10 @@
        if (compat->dhcp4.hostname)
                xml_node_dict_set(dhcp, "hostname", compat->dhcp4.hostname);
 
+       if (compat->dhcp4.route_priority)
+               xml_node_dict_set(dhcp, "route-priority",
+                               ni_sprint_uint(compat->dhcp4.route_priority));
+
        if (compat->dhcp4.start_delay)
                xml_node_dict_set(dhcp, "start-delay",
                                ni_sprint_timeout(compat->dhcp4.start_delay));
@@ -1170,7 +1174,7 @@
 }
 
 static ni_bool_t
-__ni_compat_generate_ipv4_devconf(xml_node_t *ifnode, const ni_ipv4_devinfo_t 
*ipv4)
+__ni_compat_generate_ipv4_devconf(xml_node_t *ifnode, const ni_ipv4_devinfo_t 
*ipv4, ni_iftype_t iftype)
 {
        xml_node_t *node;
 
@@ -1185,8 +1189,24 @@
        }
 
        __ni_compat_optional_tristate("forwarding", node, 
ipv4->conf.forwarding);
-       __ni_compat_optional_tristate("arp-verify", node, 
ipv4->conf.arp_verify);
-       __ni_compat_optional_tristate("arp-notify", node, 
ipv4->conf.arp_notify);
+       switch (iftype) {
+       case NI_IFTYPE_ETHERNET:
+       case NI_IFTYPE_WIRELESS:
+       case NI_IFTYPE_BRIDGE:
+       case NI_IFTYPE_BOND:
+       case NI_IFTYPE_VLAN:
+       case NI_IFTYPE_MACVLAN:
+       case NI_IFTYPE_MACVTAP:
+       case NI_IFTYPE_INFINIBAND:
+       case NI_IFTYPE_INFINIBAND_CHILD:
+       case NI_IFTYPE_TOKENRING:
+       case NI_IFTYPE_FIREWIRE:
+       case NI_IFTYPE_UNKNOWN:
+               __ni_compat_optional_tristate("arp-verify", node, 
ipv4->conf.arp_verify);
+               __ni_compat_optional_tristate("arp-notify", node, 
ipv4->conf.arp_notify);
+       default:
+               break;
+       }
 
        if (node->children) {
                xml_node_add_child(ifnode, node);
@@ -1317,7 +1337,7 @@
        if (dev->link.mtu)
                xml_node_new_element("mtu", linknode, 
ni_sprint_uint(dev->link.mtu));
 
-       __ni_compat_generate_ipv4_devconf(ifnode, dev->ipv4);
+       __ni_compat_generate_ipv4_devconf(ifnode, dev->ipv4, dev->link.type);
        if (dev->ipv4 && !ni_tristate_is_disabled(dev->ipv4->conf.enabled)) {
                __ni_compat_generate_static_addrconf(ifnode, compat, AF_INET);
                __ni_compat_generate_dhcp4_addrconf(ifnode, compat);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/client/suse/compat-suse.c 
new/wicked-0.5.27/client/suse/compat-suse.c
--- old/wicked-0.5.26/client/suse/compat-suse.c 2014-05-22 07:41:43.000000000 
+0200
+++ new/wicked-0.5.27/client/suse/compat-suse.c 2014-05-28 21:09:26.000000000 
+0200
@@ -2942,6 +2942,9 @@
                                        NI_ADDRCONF_UPDATE_DEFAULT_ROUTE, 
FALSE);
                }
        }
+       if (ni_sysconfig_get_integer(sc, "DHCLIENT_ROUTE_PRIORITY", &uint))
+               compat->dhcp4.route_priority = uint;
+
        if ((string = ni_sysconfig_get_value(sc, "DHCLIENT_MODIFY_SMB_CONF"))) {
                if (ni_string_eq(string, "yes")) {
                        ni_addrconf_update_set(&compat->dhcp4.update,
@@ -3142,14 +3145,16 @@
                                ni_tristate_set(&ipv4->conf.arp_verify, 
!ni_string_eq(value, "no"));
                        }
                        if ((value = 
ni_sysconfig_get_value(__ni_suse_config_defaults,
-                                               "SEND_GRATUITOUS_ARP"))) {
+                                               "SEND_GRATUITOUS_ARP"))
+                                       && !ni_string_eq(value, "auto")) {
                                ni_tristate_set(&ipv4->conf.arp_notify, 
ni_string_eq(value, "yes"));
                        }
                }
                if ((value = ni_sysconfig_get_value(sc, "CHECK_DUPLICATE_IP"))) 
{
                        ni_tristate_set(&ipv4->conf.arp_verify, 
!ni_string_eq(value, "no"));
                }
-               if ((value = ni_sysconfig_get_value(sc, 
"SEND_GRATUITOUS_ARP"))) {
+               if ((value = ni_sysconfig_get_value(sc, "SEND_GRATUITOUS_ARP"))
+                               && !ni_string_eq(value, "auto")) {
                        ni_tristate_set(&ipv4->conf.arp_notify, 
ni_string_eq(value, "yes"));
                }
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/client/wicked-client.h 
new/wicked-0.5.27/client/wicked-client.h
--- old/wicked-0.5.26/client/wicked-client.h    2014-05-15 14:14:28.000000000 
+0200
+++ new/wicked-0.5.27/client/wicked-client.h    2014-05-28 21:09:26.000000000 
+0200
@@ -62,6 +62,7 @@
                ni_bool_t       recover_lease;
                ni_bool_t       release_lease;
 
+               unsigned int    route_priority;
                unsigned int    update;
        } dhcp4;
        struct {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/configure new/wicked-0.5.27/configure
--- old/wicked-0.5.26/configure 2014-05-22 11:11:59.000000000 +0200
+++ new/wicked-0.5.27/configure 2014-05-28 21:18:35.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.26.
+# Generated by GNU Autoconf 2.69 for wicked 0.5.27.
 #
 # 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.26'
-PACKAGE_STRING='wicked 0.5.26'
+PACKAGE_VERSION='0.5.27'
+PACKAGE_STRING='wicked 0.5.27'
 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.26 to adapt to many kinds of systems.
+\`configure' configures wicked 0.5.27 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.26:";;
+     short | recursive ) echo "Configuration of wicked 0.5.27:";;
    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.26
+wicked configure 0.5.27
 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.26, which was
+It was created by wicked $as_me 0.5.27, 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.26'
+ VERSION='0.5.27'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3125,7 +3125,7 @@
 #
 CUR=5
 AGE=5
-REV=26
+REV=27
 
 # Calculate package (soname version) suffix for the spec file.
 LIBWICKED_PACKAGE_SUFFIX="$((${CUR}-${AGE}))"
@@ -14785,7 +14785,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.26, which was
+This file was extended by wicked $as_me 0.5.27, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14852,7 +14852,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.26
+wicked config.status 0.5.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/wicked-0.5.26/configure.ac 
new/wicked-0.5.27/configure.ac
--- old/wicked-0.5.26/configure.ac      2014-05-22 11:04:45.000000000 +0200
+++ new/wicked-0.5.27/configure.ac      2014-05-28 21:17:04.000000000 +0200
@@ -19,7 +19,7 @@
 #
 CUR=5
 AGE=5
-REV=26
+REV=27
 
 # Calculate package (soname version) suffix for the spec file.
 AC_SUBST(LIBWICKED_PACKAGE_SUFFIX, "$((${CUR}-${AGE}))")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/dhcp4/fsm.c 
new/wicked-0.5.27/dhcp4/fsm.c
--- old/wicked-0.5.26/dhcp4/fsm.c       2014-05-15 14:14:28.000000000 +0200
+++ new/wicked-0.5.27/dhcp4/fsm.c       2014-05-28 21:09:26.000000000 +0200
@@ -20,6 +20,7 @@
 #include <wicked/netinfo.h>
 #include <wicked/logging.h>
 #include <wicked/route.h>
+#include <netlink/netlink.h>
 #include "netinfo_priv.h"
 #include "buffer.h"
 
@@ -652,7 +653,7 @@
                }
 
                /* If the user requested a specific route metric, apply it now 
*/
-               if (dev->config && dev->config->route_priority) {
+               if (dev->config) {
                        ni_route_table_t *tab;
                        ni_route_t *rp;
                        unsigned int i;
@@ -661,6 +662,7 @@
                                for (i = 0; i < tab->routes.count; ++i) {
                                        if ((rp = tab->routes.data[i]) == NULL)
                                                continue;
+                                       rp->protocol = RTPROT_DHCP;
                                        rp->priority = 
dev->config->route_priority;
                                }
                        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/dhcp4/protocol.c 
new/wicked-0.5.27/dhcp4/protocol.c
--- old/wicked-0.5.26/dhcp4/protocol.c  2014-05-15 14:14:28.000000000 +0200
+++ new/wicked-0.5.27/dhcp4/protocol.c  2014-05-28 21:09:26.000000000 +0200
@@ -429,8 +429,25 @@
                        options->hostname && options->hostname[0]) {
 
                        if (options->fqdn == FQDN_DISABLE) {
-                               ni_dhcp4_option_puts(msgbuf, DHCP4_HOSTNAME,
-                                                       options->hostname);
+                               char hname[64] = {'\0'}, *end;
+                               size_t len;
+
+                               /*
+                                * Truncate the domain part if fqdn to avoid 
attempts
+                                * to update DNS with foo.bar + update-domain.
+                                */
+                               strncat(hname, options->hostname, 
sizeof(hname)-1);
+                               if ((end = strchr(hname, '.')))
+                                       *end = '\0';
+
+                               len = ni_string_len(hname);
+                               if (ni_check_domain_name(hname, len, 0)) {
+                                       ni_dhcp4_option_puts(msgbuf, 
DHCP4_HOSTNAME,
+                                                                       hname);
+                               } else {
+                                       ni_info("Not sending suspect hostname: 
'%s'",
+                                               ni_print_suspect(hname, len));
+                               }
                        } else {
                                /* IETF DHC-FQDN option(81)
                                 * 
http://tools.ietf.org/html/rfc4702#section-2.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/extensions/hostname 
new/wicked-0.5.27/extensions/hostname
--- old/wicked-0.5.26/extensions/hostname       2014-05-15 14:14:28.000000000 
+0200
+++ new/wicked-0.5.27/extensions/hostname       2014-05-28 21:09:26.000000000 
+0200
@@ -53,6 +53,8 @@
                curr_hostname=`get_current_hostname`
                if test "X${def_hostname}" != "X" -a "X${curr_hostname}" != 
"X${def_hostname}" ; then
                        /bin/hostname "${def_hostname}"
+
+                       rcsyslog reload &>/dev/null
                fi
        fi
 ;;
@@ -82,6 +84,8 @@
                if test "X${hostname_arg}" != "X" -a "X${hostname_cur}" != 
"X${hostname_arg}" ; then
                        # Only update the hostname it differs from the system.
                        /bin/hostname "${hostname_arg}" 2>/dev/null
+
+                       rcsyslog reload &>/dev/null
                fi
 
                # Store regardless of whether hostname differs from the system.
@@ -103,6 +107,8 @@
                        curr_hostname=`get_current_hostname`
                        if test "X${def_hostname}" != "X" -a 
"X${curr_hostname}" != "X${def_hostname}" ; then
                                /bin/hostname "${def_hostname}"
+
+                               rcsyslog reload &>/dev/null
                        fi
                fi
        fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/include/wicked/addrconf.h 
new/wicked-0.5.27/include/wicked/addrconf.h
--- old/wicked-0.5.26/include/wicked/addrconf.h 2014-05-15 14:14:28.000000000 
+0200
+++ new/wicked-0.5.27/include/wicked/addrconf.h 2014-05-28 21:09:26.000000000 
+0200
@@ -202,4 +202,6 @@
 extern const char *    ni_netbios_node_type_to_name(unsigned int);
 extern ni_bool_t       ni_netbios_node_type_to_code(const char *, unsigned int 
*);
 
+extern unsigned int    ni_addrconf_lease_get_priority(const 
ni_addrconf_lease_t *);
+
 #endif /* __WICKED_ADDRCONF_H__ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/include/wicked/netinfo.h 
new/wicked-0.5.27/include/wicked/netinfo.h
--- old/wicked-0.5.26/include/wicked/netinfo.h  2014-05-15 14:14:28.000000000 
+0200
+++ new/wicked-0.5.27/include/wicked/netinfo.h  2014-05-28 21:09:26.000000000 
+0200
@@ -220,6 +220,7 @@
 extern void            ni_netdev_set_client_state(ni_netdev_t *, 
ni_client_state_t *);
 extern ni_client_state_t *     ni_netdev_get_client_state(ni_netdev_t *);
 extern void            ni_netdev_load_client_state(ni_netdev_t *);
+extern ni_bool_t       ni_netdev_supports_arp(ni_netdev_t *);
 
 extern void             ni_netdev_clear_addresses(ni_netdev_t *);
 extern void             ni_netdev_clear_routes(ni_netdev_t *);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/include/wicked/route.h 
new/wicked-0.5.27/include/wicked/route.h
--- old/wicked-0.5.26/include/wicked/route.h    2014-02-18 15:27:29.000000000 
+0100
+++ new/wicked-0.5.27/include/wicked/route.h    2014-05-28 21:09:26.000000000 
+0200
@@ -95,6 +95,8 @@
 extern ni_route_t *            ni_route_ref(ni_route_t *);
 extern void                    ni_route_free(ni_route_t *);
 extern ni_bool_t               ni_route_equal(const ni_route_t *, const 
ni_route_t *);
+extern ni_bool_t               ni_route_equal_gateways(const ni_route_t *, 
const ni_route_t *);
+extern ni_bool_t               ni_route_equal_destination(const ni_route_t *, 
const ni_route_t *);
 extern const char *            ni_route_print(ni_stringbuf_t *, const 
ni_route_t *);
 
 extern const char *            ni_route_type_type_to_name(unsigned int);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/src/dbus-connection.c 
new/wicked-0.5.27/src/dbus-connection.c
--- old/wicked-0.5.26/src/dbus-connection.c     2014-05-15 14:14:28.000000000 
+0200
+++ new/wicked-0.5.27/src/dbus-connection.c     2014-05-28 21:09:26.000000000 
+0200
@@ -51,6 +51,8 @@
 
 struct ni_dbus_connection {
        DBusConnection *        conn;
+       ni_bool_t               private;
+
        ni_dbus_async_client_call_t *async_client_calls;
        ni_dbus_async_server_call_t *async_server_calls;
        ni_dbus_sigaction_t *   sighandlers;
@@ -149,6 +151,7 @@
        connection = calloc(1, sizeof(*connection));
        if (bus_name == NULL) {
                connection->conn = dbus_bus_get_private(bus_type, &error);
+               connection->private = TRUE;
                if (dbus_error_is_set(&error)) {
                        ni_error("Cannot get dbus %s bus handle (%s)",
                                        bus_type == DBUS_BUS_SYSTEM? "system" : 
"session",
@@ -161,6 +164,7 @@
                int rv;
 
                connection->conn = dbus_bus_get(bus_type, &error);
+               connection->private = FALSE;
                if (dbus_error_is_set(&error)) {
                        ni_error("Cannot get dbus %s bus handle (%s)",
                                        bus_type == DBUS_BUS_SYSTEM? "system" : 
"session",
@@ -240,7 +244,8 @@
        }
 
        if (dbc->conn) {
-               dbus_connection_close(dbc->conn);
+               if (dbc->private)
+                       dbus_connection_close(dbc->conn);
                dbus_connection_unref(dbc->conn);
                dbc->conn = NULL;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/src/ifconfig.c 
new/wicked-0.5.27/src/ifconfig.c
--- old/wicked-0.5.26/src/ifconfig.c    2014-05-19 18:11:42.000000000 +0200
+++ new/wicked-0.5.27/src/ifconfig.c    2014-05-28 21:09:26.000000000 +0200
@@ -75,9 +75,9 @@
 static int     __ni_netdev_update_addrs(ni_netdev_t *dev,
                                const ni_addrconf_lease_t *old_lease,
                                ni_address_t *cfg_addr_list);
-static int     __ni_netdev_update_routes(ni_netdev_t *dev,
+static int     __ni_netdev_update_routes(ni_netconfig_t *nc, ni_netdev_t *dev,
                                const ni_addrconf_lease_t *old_lease,
-                               ni_route_table_t *cfg_route_list);
+                               ni_addrconf_lease_t       *new_lease);
 
 static int     __ni_rtnl_link_create(const ni_netdev_t *cfg);
 static int     __ni_rtnl_link_change(ni_netdev_t *dev, const ni_netdev_t *cfg);
@@ -214,9 +214,9 @@
         * Ignore all routes covered by other address config mechanisms.
         */
        if (lease->state == NI_ADDRCONF_STATE_GRANTED)
-               res = __ni_netdev_update_routes(dev, old_lease, lease->routes);
+               res = __ni_netdev_update_routes(nc, dev, old_lease, lease);
        else
-               res = __ni_netdev_update_routes(dev, old_lease, NULL);
+               res = __ni_netdev_update_routes(nc, dev, old_lease, NULL);
        if (res < 0) {
                ni_error("%s: error updating interface config from %s lease",
                                dev->name, 
@@ -1239,11 +1239,9 @@
 int
 ni_system_tuntap_delete(ni_netdev_t *dev)
 {
-       int rv;
-
        if (__ni_rtnl_link_delete(dev)) {
                ni_error("could not destroy tun/tap interface %s", dev->name);
-               return rv;
+               return -1;
        }
        return 0;
 }
@@ -2134,7 +2132,10 @@
        struct nl_msg *msg;
        int err;
 
-       ni_debug_ifconfig("%s(%s)", __FUNCTION__, ni_route_print(&buf, rp));
+       ni_debug_ifconfig("%s(%s%s)", __FUNCTION__,
+                       flags & NLM_F_REPLACE ? "replace " :
+                       flags & NLM_F_CREATE  ? "create " : "",
+                       ni_route_print(&buf, rp));
        ni_stringbuf_destroy(&buf);
 
        memset(&rt, 0, sizeof(rt));
@@ -2520,8 +2521,20 @@
        if (ni_address_is_duplicate(ap))
                return FALSE;
 
+       switch (dev->link.hwaddr.type) {
+       case ARPHRD_LOOPBACK:
+       case ARPHRD_IEEE1394:
+               return TRUE;
+       default: ;
+       }
+
        ipv4 = ni_netdev_get_ipv4(dev);
-       if (ipv4 && !ni_tristate_is_enabled(ipv4->conf.arp_notify))
+       if (!ipv4 || ni_tristate_is_disabled(ipv4->conf.arp_notify))
+               return TRUE;
+
+       /* default/unset is "auto" -> same as verify */
+       if (!ni_tristate_is_set(ipv4->conf.arp_notify) &&
+           !ni_tristate_is_enabled(ipv4->conf.arp_verify))
                return TRUE;
 
        return __ni_netdev_call_arp_util(dev, ap, FALSE);
@@ -2649,39 +2662,57 @@
                if (rp->table != rp2->table)
                        continue;
 
-               if (rp->family != rp2->family
-                || rp->prefixlen != rp2->prefixlen)
+               if (ni_route_equal_destination(rp, rp2))
+                       return rp2;
+       }
+
+       return NULL;
+}
+
+static ni_route_t *
+__ni_skip_conflicting_route(ni_netconfig_t *nc, ni_netdev_t *our_dev,
+               ni_addrconf_lease_t *our_lease, ni_route_t *our_rp)
+{
+       ni_stringbuf_t buf = NI_STRINGBUF_INIT_DYNAMIC;
+       ni_netdev_t *dev;
+       ni_route_table_t *tab;
+       ni_route_t *rp;
+       unsigned int i;
+
+       for (dev = ni_netconfig_devlist(nc); dev; dev = dev->next) {
+               if (!dev->routes)
                        continue;
 
-               if (rp->prefixlen && !ni_sockaddr_equal(&rp->destination, 
&rp2->destination))
+               if (!(tab = ni_route_tables_find(dev->routes, our_rp->table)))
                        continue;
 
-               if (rp->family == AF_INET) {
-                       /* ipv4 matches routing entries by [prefix, tos, 
priority] */
-                       if (rp->tos == rp2->tos
-                        && rp->priority == rp2->priority)
-                               return rp2;
-               } else
-               if (rp->family == AF_INET6) {
-                       /* ipv6 matches routing entries by [dst pfx, src pfx, 
priority] */
-                       /* We don't support source routes yet. */
-                       if (rp->priority == rp2->priority)
-                               return rp2;
+               for (i = 0; i < tab->routes.count; ++i) {
+                       rp = tab->routes.data[i];
+                       if (!rp || !ni_route_equal_destination(rp, our_rp))
+                               continue;
+
+                       ni_debug_ifconfig("%s: skipping conflicting %s:%s 
route: %s",
+                                       our_dev->name,
+                                       
ni_addrfamily_type_to_name(our_lease->family),
+                                       
ni_addrconf_type_to_name(our_lease->type),
+                                       ni_route_print(&buf, rp));
+                       ni_stringbuf_destroy(&buf);
+
+                       return rp;
                }
        }
-
        return NULL;
 }
 
 static int
-__ni_netdev_update_routes(ni_netdev_t *dev,
+__ni_netdev_update_routes(ni_netconfig_t *nc, ni_netdev_t *dev,
                                const ni_addrconf_lease_t *old_lease,
-                               ni_route_table_t *cfg_route_list)
+                               ni_addrconf_lease_t       *new_lease)
 {
        ni_stringbuf_t buf = NI_STRINGBUF_INIT_DYNAMIC;
        ni_route_table_t *tab, *cfg_tab;
        ni_route_t *rp, *new_route;
-       unsigned int i;
+       unsigned int minprio, i;
        int rv = 0;
 
        /* Loop over all tables and routes currently assigned to the interface.
@@ -2696,13 +2727,13 @@
 
                        /* See if the config list contains the route we've
                         * found in the system. */
-                       cfg_tab = ni_route_tables_find(cfg_route_list, 
rp->table);
+                       cfg_tab = new_lease ? 
ni_route_tables_find(new_lease->routes, rp->table) : NULL;
                        if (cfg_tab)
                                new_route = 
__ni_netdev_route_table_contains(cfg_tab, rp);
                        else
                                new_route = NULL;
 
-                       /* Do not touch route not managed by us. */
+                       /* Do not touch route if not managed by us. */
                        if (rp->config_lease == NULL) {
                                if (new_route == NULL)
                                        continue;
@@ -2712,6 +2743,7 @@
                                 * is ours now. */
                                rp->config_lease = old_lease;
                        }
+                       minprio = 
ni_addrconf_lease_get_priority(rp->config_lease);
 
                        /* If the route was managed by us (ie its owned by a 
lease with
                         * the same family/addrconf mode), then we want to 
check whether
@@ -2720,7 +2752,7 @@
                        if (rp->config_lease == old_lease) {
                                ni_addrconf_lease_t *other;
 
-                               if ((other = __ni_netdev_route_to_lease(dev, 
rp)) != NULL)
+                               if ((other = __ni_netdev_route_to_lease(dev, 
rp, minprio)) != NULL)
                                        rp->config_lease = other;
                        }
 
@@ -2729,8 +2761,9 @@
                                 * addrconf mode.
                                 */
                                if (new_route != NULL) {
-                                       ni_warn("route %s covered by a %s 
lease",
+                                       ni_warn("route %s covered by a %s:%s 
lease",
                                                ni_route_print(&buf, rp),
+                                               
ni_addrfamily_type_to_name(rp->config_lease->family),
                                                
ni_addrconf_type_to_name(rp->config_lease->type));
                                        ni_stringbuf_destroy(&buf);
                                }
@@ -2742,7 +2775,9 @@
                                        ni_debug_ifconfig("%s: successfully 
updated existing route %s",
                                                        dev->name, 
ni_route_print(&buf, rp));
                                        ni_stringbuf_destroy(&buf);
+                                       new_route->config_lease = new_lease;
                                        new_route->seq = __ni_global_seqno;
+                                       __ni_netdev_record_newroute(nc, dev, 
new_route);
                                        continue;
                                }
 
@@ -2763,7 +2798,7 @@
        /* Loop over all tables and routes in the configuration
         * and create those that don't exist yet.
         */
-       for (tab = cfg_route_list; tab; tab = tab->next) {
+       for (tab = new_lease ? new_lease->routes : NULL; tab; tab = tab->next) {
                for (i = 0; i < tab->routes.count; ++i) {
                        if ((rp = tab->routes.data[i]) == NULL)
                                continue;
@@ -2771,12 +2806,21 @@
                        if (rp->seq == __ni_global_seqno)
                                continue;
 
-                       ni_debug_ifconfig("%s: adding new route %s",
+                       if (__ni_skip_conflicting_route(nc, dev, new_lease, rp))
+                               continue;
+
+                       ni_debug_ifconfig("%s: adding new %s:%s lease route %s",
+                                       
ni_addrfamily_type_to_name(new_lease->family),
+                                       
ni_addrconf_type_to_name(new_lease->type),
                                        dev->name, ni_route_print(&buf, rp));
                        ni_stringbuf_destroy(&buf);
 
                        if ((rv = __ni_rtnl_send_newroute(dev, rp, 
NLM_F_CREATE)) < 0)
                                return rv;
+
+                       rp->config_lease = new_lease;
+                       rp->seq = __ni_global_seqno;
+                       __ni_netdev_record_newroute(nc, dev, rp);
                }
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/src/iflist.c 
new/wicked-0.5.27/src/iflist.c
--- old/wicked-0.5.26/src/iflist.c      2014-05-19 18:11:42.000000000 +0200
+++ new/wicked-0.5.27/src/iflist.c      2014-05-28 21:09:26.000000000 +0200
@@ -1962,7 +1962,7 @@
        return 0;
 }
 
-static int
+int
 __ni_netdev_record_newroute(ni_netconfig_t *nc, ni_netdev_t *dev, ni_route_t 
*rp)
 {
        ni_stringbuf_t  buf = NI_STRINGBUF_INIT_DYNAMIC;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/src/ipv4.c new/wicked-0.5.27/src/ipv4.c
--- old/wicked-0.5.26/src/ipv4.c        2014-05-15 14:14:28.000000000 +0200
+++ new/wicked-0.5.27/src/ipv4.c        2014-05-28 21:09:26.000000000 +0200
@@ -57,6 +57,7 @@
        ipv4 = xcalloc(1, sizeof(*ipv4));
        ipv4->conf.enabled = NI_TRISTATE_DEFAULT;
        ipv4->conf.arp_verify = NI_TRISTATE_DEFAULT;
+       ipv4->conf.arp_notify = NI_TRISTATE_DEFAULT;
        __ni_ipv4_devconf_reset(&ipv4->conf);
        return ipv4;
 }
@@ -73,14 +74,19 @@
 int
 ni_system_ipv4_devinfo_get(ni_netdev_t *dev, ni_ipv4_devinfo_t *ipv4)
 {
+       ni_bool_t can_arp;
+
        if (ipv4 == NULL)
                ipv4 = ni_netdev_get_ipv4(dev);
 
        if (!ni_tristate_is_set(ipv4->conf.enabled))
                ipv4->conf.enabled = NI_TRISTATE_ENABLE;
 
-       if (!ni_tristate_is_set(ipv4->conf.arp_verify))
-               ipv4->conf.arp_verify = NI_TRISTATE_ENABLE;
+       can_arp = ni_netdev_supports_arp(dev);
+       if (!ni_tristate_is_set(ipv4->conf.arp_verify)) {
+               ipv4->conf.arp_verify = can_arp ?
+                       NI_TRISTATE_ENABLE : NI_TRISTATE_DISABLE;
+       }
 
        if (ni_sysctl_ipv4_ifconfig_is_present(dev->name)) {
                int val;
@@ -88,7 +94,7 @@
                if (ni_sysctl_ipv4_ifconfig_get_int(dev->name, "forwarding", 
&val) >= 0)
                        ni_tristate_set(&ipv4->conf.forwarding, val);
 
-               if (ni_sysctl_ipv4_ifconfig_get_int(dev->name, "arp_notify", 
&val) >= 0)
+               if (can_arp && ni_sysctl_ipv4_ifconfig_get_int(dev->name, 
"arp_notify", &val) >= 0)
                        ni_tristate_set(&ipv4->conf.arp_notify, val);
 
                if (ni_sysctl_ipv4_ifconfig_get_int(dev->name, 
"accept_redirects", &val) >= 0)
@@ -125,6 +131,8 @@
 ni_system_ipv4_devinfo_set(ni_netdev_t *dev, const ni_ipv4_devconf_t *conf)
 {
        ni_ipv4_devinfo_t *ipv4;
+       ni_tristate_t arp_notify;
+       ni_bool_t can_arp;
 
        if (!conf || !(ipv4 = ni_netdev_get_ipv4(dev)))
                return -1;
@@ -136,12 +144,17 @@
                                                conf->forwarding) == 0)
                ipv4->conf.forwarding = conf->forwarding;
 
-       if (ni_tristate_is_set(conf->arp_verify))
+       can_arp = ni_netdev_supports_arp(dev);
+       if (ni_tristate_is_set(conf->arp_verify) && can_arp)
                ni_tristate_set(&ipv4->conf.arp_verify, conf->arp_verify);
+       else
+               ni_tristate_set(&ipv4->conf.arp_verify, FALSE);
 
+       arp_notify = ni_tristate_is_set(conf->arp_notify) && can_arp ?
+                       conf->arp_notify : conf->arp_verify;
        if (__ni_system_ipv4_devinfo_change_int(dev->name, "arp_notify",
-                                               conf->arp_notify) == 0)
-               ipv4->conf.arp_notify = conf->arp_notify;
+                                       arp_notify) == 0)
+               ipv4->conf.arp_notify = arp_notify;
 
        if (__ni_system_ipv4_devinfo_change_int(dev->name, "accept_redirects",
                                                conf->accept_redirects) == 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/src/netdev.c 
new/wicked-0.5.27/src/netdev.c
--- old/wicked-0.5.26/src/netdev.c      2014-05-15 14:14:28.000000000 +0200
+++ new/wicked-0.5.27/src/netdev.c      2014-05-28 21:09:26.000000000 +0200
@@ -809,27 +809,44 @@
  * Given a route, look up the lease owning it
  */
 ni_addrconf_lease_t *
-__ni_netdev_route_to_lease(ni_netdev_t *dev, const ni_route_t *rp)
+__ni_netdev_route_to_lease(ni_netdev_t *dev, const ni_route_t *rp, unsigned 
int minprio)
 {
        ni_addrconf_lease_t *lease;
+       ni_addrconf_lease_t *found = NULL;
        ni_address_t *ap;
+       unsigned int prio;
 
        if (!dev || !rp)
                return NULL;
 
        for (lease = dev->leases; lease; lease = lease->next) {
+               if (rp->family != lease->family)
+                       continue;
+
+               if ((prio = ni_addrconf_lease_get_priority(lease)) < minprio)
+                       continue;
+
                /* First, check if this is an interface route */
                for (ap = lease->addrs; ap; ap = ap->next) {
-                       if (rp->prefixlen == ap->prefixlen
-                        && ni_sockaddr_prefix_match(ap->prefixlen, 
&rp->destination, &ap->local_addr))
-                               return lease;
+                       if (ni_sockaddr_is_specified(&rp->nh.gateway))
+                               continue;
+                       if (rp->prefixlen != ap->prefixlen)
+                               continue;
+                       if (!ni_sockaddr_prefix_match(ap->prefixlen,
+                               &rp->destination, &ap->local_addr))
+                               continue;
+
+                       if (!found || prio > 
ni_addrconf_lease_get_priority(found))
+                               found = lease;
                }
 
-               if (__ni_lease_owns_route(lease, rp))
-                       return lease;
+               if (__ni_lease_owns_route(lease, rp)) {
+                       if (!found || prio > 
ni_addrconf_lease_get_priority(found))
+                               found = lease;
+               }
        }
 
-       return NULL;
+       return found;
 }
 
 ni_route_t *
@@ -921,3 +938,17 @@
        *list = new_ifp;
 }
 
+ni_bool_t
+ni_netdev_supports_arp(ni_netdev_t *dev)
+{
+       if (dev) {
+               switch (dev->link.hwaddr.type) {
+               case ARPHRD_LOOPBACK:
+                       return FALSE;
+               default:
+                       return dev->link.ifflags & NI_IFF_ARP_ENABLED;
+               }
+       }
+       return FALSE;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/src/netinfo.c 
new/wicked-0.5.27/src/netinfo.c
--- old/wicked-0.5.26/src/netinfo.c     2014-05-15 14:14:28.000000000 +0200
+++ new/wicked-0.5.27/src/netinfo.c     2014-05-28 21:09:26.000000000 +0200
@@ -794,3 +794,22 @@
        }
 }
 
+unsigned int
+ni_addrconf_lease_get_priority(const ni_addrconf_lease_t *lease)
+{
+       if (!lease)
+               return 0;
+
+       switch (lease->type) {
+       case NI_ADDRCONF_STATIC:
+               return 2;
+
+       case NI_ADDRCONF_DHCP:
+       case NI_ADDRCONF_INTRINSIC:
+               return 1;
+
+       case NI_ADDRCONF_AUTOCONF:
+       default:
+               return 0;
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/src/netinfo_priv.h 
new/wicked-0.5.27/src/netinfo_priv.h
--- old/wicked-0.5.26/src/netinfo_priv.h        2014-05-15 14:14:28.000000000 
+0200
+++ new/wicked-0.5.27/src/netinfo_priv.h        2014-05-28 21:09:26.000000000 
+0200
@@ -44,10 +44,11 @@
 extern void            __ni_netdev_list_destroy(ni_netdev_t **);
 extern ni_addrconf_lease_t *__ni_netdev_find_lease(ni_netdev_t *, unsigned 
int, ni_addrconf_mode_t, int);
 extern ni_addrconf_lease_t *__ni_netdev_address_to_lease(ni_netdev_t *, const 
ni_address_t *);
-extern ni_addrconf_lease_t *__ni_netdev_route_to_lease(ni_netdev_t *, const 
ni_route_t *);
+extern ni_addrconf_lease_t *__ni_netdev_route_to_lease(ni_netdev_t *, const 
ni_route_t *, unsigned int);
 extern void            __ni_netdev_track_ipv6_autoconf(ni_netdev_t *, int);
 extern unsigned int    __ni_netdev_translate_ifflags(unsigned int);
 extern void            __ni_netdev_event(ni_netconfig_t *, ni_netdev_t *, 
ni_event_t);
+extern int             __ni_netdev_record_newroute(ni_netconfig_t *nc, 
ni_netdev_t *dev, ni_route_t *rp);
 
 extern void            __ni_routes_clear(ni_netconfig_t *);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/src/route.c 
new/wicked-0.5.27/src/route.c
--- old/wicked-0.5.26/src/route.c       2014-05-15 14:14:28.000000000 +0200
+++ new/wicked-0.5.27/src/route.c       2014-05-28 21:09:26.000000000 +0200
@@ -285,17 +285,36 @@
 }
 
 ni_bool_t
-ni_route_equal(const ni_route_t *r1, const ni_route_t *r2)
+ni_route_equal_destination(const ni_route_t *r1, const ni_route_t *r2)
 {
-       const ni_route_nexthop_t *nh1, *nh2;
+       if (r1->family != r2->family)
+               return FALSE;
 
-       if (r1->prefixlen != r2->prefixlen
-        || !ni_sockaddr_equal(&r1->destination, &r2->destination))
+       if (r1->prefixlen != r2->prefixlen)
                return FALSE;
 
-       if (r1->priority != r2->priority)
+       if (r1->prefixlen && !ni_sockaddr_equal(&r1->destination, 
&r2->destination))
                return FALSE;
 
+       if (r1->family == AF_INET) {
+               /* ipv4 matches routing entries by [prefix, tos, priority] */
+               if (r1->tos != r2->tos || r1->priority != r2->priority)
+                       return FALSE;
+       } else
+       if (r1->family == AF_INET6) {
+               /* ipv6 matches routing entries by [dst pfx, src pfx, priority];
+                * we don't support source routes yet. */
+               if (r1->priority != r2->priority)
+                       return FALSE;
+       }
+       return TRUE;
+}
+
+ni_bool_t
+ni_route_equal_gateways(const ni_route_t *r1, const ni_route_t *r2)
+{
+       const ni_route_nexthop_t *nh1, *nh2;
+
        nh1 = &r1->nh;
        nh2 = &r2->nh;
        while (nh1 && nh2) {
@@ -307,6 +326,15 @@
        return nh1 == nh2;
 }
 
+ni_bool_t
+ni_route_equal(const ni_route_t *r1, const ni_route_t *r2)
+{
+
+       if (!ni_route_equal_destination(r1, r2))
+               return FALSE;
+       return ni_route_equal_gateways(r1, r2);
+}
+
 const char *
 __ni_route_print_flags(ni_stringbuf_t *out, unsigned int flags,
                const ni_intmap_t *map, const char *prefix, const char *sep)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wicked-0.5.26/wicked.spec 
new/wicked-0.5.27/wicked.spec
--- old/wicked-0.5.26/wicked.spec       2014-05-22 11:12:05.000000000 +0200
+++ new/wicked-0.5.27/wicked.spec       2014-05-28 21:18:41.000000000 +0200
@@ -18,7 +18,7 @@
 
 %define                release_prefix  %{?snapshot:%{snapshot}}%{!?snapshot:0}
 Name:           wicked
-Version:        0.5.26
+Version:        0.5.27
 Release:        %{release_prefix}.0.0
 Summary:        Network configuration infrastructure
 License:        GPL-2.0

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to