Hello community, here is the log from the commit of package wicked for openSUSE:Factory checked in at 2014-10-11 22:41:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-09-28 19:55:41.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.wicked.new/wicked.changes 2014-10-11 22:41:47.000000000 +0200 @@ -1,0 +2,18 @@ +Fri Oct 10 12:06:15 UTC 2014 - [email protected] + +- version 0.6.12 +- ethernet: Do not fail when ETHTOOL_GSET/SSET fails + (bnc#900401, bnc#900112) +- dbus: omit ethernet speed, duplex, autoneg properties if not + supported by the driver +- ethtool: independent ioctl requests are handled separately: + if one fails it does not stop the following ones +- wireless: request assosciation even if link was up; linkup + indicates assosciation, rather than explicit linkAssosciate + event (bnc#893665) +- bonding: ignore redundant slaves in configs with a warning +- fsm: Generate default config for children in existing relation +- compat: prefer /etc/hostname over /etc/HOSTNAME and warn about + missed global configs (bnc#887910) + +------------------------------------------------------------------- Old: ---- wicked-0.6.11.tar.bz2 New: ---- wicked-0.6.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wicked.spec ++++++ --- /var/tmp/diff_new_pack.k6vcKz/_old 2014-10-11 22:41:48.000000000 +0200 +++ /var/tmp/diff_new_pack.k6vcKz/_new 2014-10-11 22:41:48.000000000 +0200 @@ -18,7 +18,7 @@ %define release_prefix %{?snapshot:%{snapshot}}%{!?snapshot:0} Name: wicked -Version: 0.6.11 +Version: 0.6.12 Release: %{release_prefix}.0.0 Summary: Network configuration infrastructure License: GPL-2.0 ++++++ wicked-0.6.11.tar.bz2 -> wicked-0.6.12.tar.bz2 ++++++ ++++ 2389 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/ChangeLog new/wicked-0.6.12/ChangeLog --- old/wicked-0.6.11/ChangeLog 2014-09-26 17:06:27.000000000 +0200 +++ new/wicked-0.6.12/ChangeLog 2014-10-10 14:15:02.000000000 +0200 @@ -1,3 +1,65 @@ +commit 4546785dc9c85352bf4747a554f8f4c076ae8d5b +Author: Pawel Wieczorkiewicz <[email protected]> +Date: Fri Oct 10 14:07:34 2014 +0200 + + version 0.6.12 + +commit 257e482317e30f33ea0200af154a9834871b92fc +Author: Marius Tomaschewski <[email protected]> +Date: Fri Oct 10 08:50:42 2014 +0200 + + dbus: omit ethernet speed,duplex,autoneg defaults + +commit f763505ef93a4db1e8cdec1a1a1ea70e58125766 +Author: Pawel Wieczorkiewicz <[email protected]> +Date: Thu Oct 9 22:25:28 2014 +0200 + + ethtool: Refactor handling of independed ethtool ioctl + + One ioctl failing should not block the other ones. + +commit 055b6f1d05a3c156684ca9546fa2655372ffb4cf +Author: Pawel Wieczorkiewicz <[email protected]> +Date: Thu Oct 9 22:25:06 2014 +0200 + + ethernet: handle ethtool offload as independent structure + +commit b599c88c259e913a77bf3fc53f93488c248c1604 +Author: Pawel Wieczorkiewicz <[email protected]> +Date: Mon Oct 6 18:21:14 2014 +0200 + + wireless: request assosciation even if link was up + +commit 1a2134ff3f2c36c6a6be6e23ad40ae432b01625a +Author: Pawel Wieczorkiewicz <[email protected]> +Date: Mon Oct 6 18:20:49 2014 +0200 + + wireless: wait for linkUP instead of linkAssosciate + +commit 509f93d6242585ed3abdfc66e22228a340331f79 +Author: Pawel Wieczorkiewicz <[email protected]> +Date: Thu Oct 2 14:10:16 2014 +0200 + + bonding: ignore redundant slaves in configs with a warning + +commit 0180252bf907117eeca8362efe330daa5a0c8f48 +Author: Pawel Wieczorkiewicz <[email protected]> +Date: Wed Oct 1 13:57:08 2014 +0200 + + fsm: Generate default config for children in existing relation + +commit de71e0063ed4257de5559706346fe71c59e8d7e3 +Author: Marius Tomaschewski <[email protected]> +Date: Mon Sep 29 16:19:04 2014 +0200 + + compat: warn about missed global configs (bnc#887910) + +commit 9286bb1a182e0d147bcb3c3ad4dcda64e875254a +Author: Marius Tomaschewski <[email protected]> +Date: Mon Sep 29 16:16:52 2014 +0200 + + compat: prefer /etc/hostname over /etc/HOSTNAME + commit 14a7218b0d96e8f64eef61f0181cd81b0be47e13 Author: Pawel Wieczorkiewicz <[email protected]> Date: Fri Sep 26 17:03:42 2014 +0200 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/VERSION new/wicked-0.6.12/VERSION --- old/wicked-0.6.11/VERSION 2014-09-26 17:03:28.000000000 +0200 +++ new/wicked-0.6.12/VERSION 2014-10-10 14:06:57.000000000 +0200 @@ -1 +1 @@ -0.6.11 +0.6.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/client/compat.c new/wicked-0.6.12/client/compat.c --- old/wicked-0.6.11/client/compat.c 2014-09-26 16:50:12.000000000 +0200 +++ new/wicked-0.6.12/client/compat.c 2014-10-10 14:05:20.000000000 +0200 @@ -201,9 +201,35 @@ } static void +__ni_compat_generate_eth_offload_node(xml_node_t *parent, const ni_ethtool_offload_t *offload) +{ + xml_node_t *node; + + if (!parent || !offload) + return; + + /* generate offload and other information */ + node = xml_node_new("offload", NULL); + + __ni_compat_optional_tristate("rx-csum", node, offload->rx_csum); + __ni_compat_optional_tristate("tx-csum", node, offload->tx_csum); + __ni_compat_optional_tristate("scatter-gather", node, offload->scatter_gather); + __ni_compat_optional_tristate("tso", node, offload->tso); + __ni_compat_optional_tristate("ufo", node, offload->ufo); + __ni_compat_optional_tristate("gso", node, offload->gso); + __ni_compat_optional_tristate("gro", node, offload->gro); + __ni_compat_optional_tristate("lro", node, offload->lro); + + if (node->children) + xml_node_add_child(parent, node); + else + xml_node_free(node); + +} + +static void __ni_compat_generate_eth_node(xml_node_t *child, const ni_ethernet_t *eth) { - xml_node_t *offload; const char *ptr; /* generate common <ethernet> node settings */ @@ -242,21 +268,7 @@ xml_node_free(wol); } - /* generate offload and other information */ - offload = xml_node_new("offload", NULL); - __ni_compat_optional_tristate("rx-csum", offload, eth->offload.rx_csum); - __ni_compat_optional_tristate("tx-csum", offload, eth->offload.tx_csum); - __ni_compat_optional_tristate("scatter-gather", offload, - eth->offload.scatter_gather); - __ni_compat_optional_tristate("tso", offload, eth->offload.tso); - __ni_compat_optional_tristate("ufo", offload, eth->offload.ufo); - __ni_compat_optional_tristate("gso", offload, eth->offload.gso); - __ni_compat_optional_tristate("gro", offload, eth->offload.gro); - __ni_compat_optional_tristate("lro", offload, eth->offload.lro); - if (offload->children) - xml_node_add_child(child, offload); - else - xml_node_free(offload); + __ni_compat_generate_eth_offload_node(child, ð->offload); } static ni_bool_t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/client/suse/compat-suse.c new/wicked-0.6.12/client/suse/compat-suse.c --- old/wicked-0.6.11/client/suse/compat-suse.c 2014-09-26 16:50:12.000000000 +0200 +++ new/wicked-0.6.12/client/suse/compat-suse.c 2014-10-10 14:05:20.000000000 +0200 @@ -99,7 +99,9 @@ static ni_bool_t __ni_ipv6_disbled; #define __NI_SUSE_SYSCONF_DIR "/etc" -#define __NI_SUSE_HOSTNAME_FILE __NI_SUSE_SYSCONF_DIR"/HOSTNAME" +#define __NI_SUSE_HOSTNAME_FILES { __NI_SUSE_SYSCONF_DIR"/hostname", \ + __NI_SUSE_SYSCONF_DIR"/HOSTNAME", \ + NULL } #define __NI_SUSE_SYSCTL_SUFFIX ".conf" #define __NI_SUSE_SYSCTL_FILE __NI_SUSE_SYSCONF_DIR"/sysctl.conf" #define __NI_SUSE_SYSCTL_DIR __NI_SUSE_SYSCONF_DIR"/sysctl.d" @@ -267,6 +269,7 @@ static const char * __ni_suse_read_default_hostname(const char *root, char **hostname) { + const char *filenames[] = __NI_SUSE_HOSTNAME_FILES, **name; char filename[PATH_MAX]; char buff[256] = {'\0'}; FILE *input; @@ -275,23 +278,25 @@ return NULL; ni_string_free(hostname); - snprintf(filename, sizeof(filename), "%s%s", - ni_string_empty(root) ? "" : root, - __NI_SUSE_HOSTNAME_FILE); + for (name = filenames; name && !ni_string_empty(*name); name++) { + snprintf(filename, sizeof(filename), "%s%s", + ni_string_empty(root) ? "" : root, *name); - if (!ni_isreg(filename)) - return NULL; - if (!(input = ni_file_open(filename, "r", 0600))) - return NULL; + if (!ni_isreg(filename)) + continue; - if (fgets(buff, sizeof(buff)-1, input)) { - buff[strcspn(buff, " \t\r\n")] = '\0'; + if (!(input = ni_file_open(filename, "r", 0600))) + continue; - if (ni_check_domain_name(buff, strlen(buff), 0)) - ni_string_dup(hostname, buff); - } - fclose(input); + if (fgets(buff, sizeof(buff)-1, input)) { + buff[strcspn(buff, " \t\r\n")] = '\0'; + if (ni_check_domain_name(buff, strlen(buff), 0)) + ni_string_dup(hostname, buff); + } + fclose(input); + break; + } return *hostname; } @@ -375,6 +380,8 @@ ni_error("unable to parse %s", pathbuf); return FALSE; } + } else { + ni_warn("unable to find global config '%s': %m", pathbuf); } snprintf(pathbuf, sizeof(pathbuf), "%s/%s", path, __NI_SUSE_CONFIG_DHCP); @@ -384,6 +391,8 @@ ni_error("unable to parse %s", pathbuf); return FALSE; } + } else { + ni_warn("unable to find global config '%s': %m", pathbuf); } snprintf(pathbuf, sizeof(pathbuf), "%s/%s", path, __NI_SUSE_ROUTES_GLOBAL); @@ -1433,32 +1442,33 @@ } static void -try_add_ethtool_offload(ni_netdev_t *dev, const char *opt, const char *val) +try_add_ethtool_offload(ni_ethtool_offload_t *offload, const char *opt, const char *val) { - ni_ethernet_t *eth = ni_netdev_get_ethernet(dev); - if (ni_string_eq(opt, "rx")) { - ni_parse_ethtool_onoff(val, ð->offload.rx_csum); - } else - if (ni_string_eq(opt, "tx")) { - ni_parse_ethtool_onoff(val, ð->offload.tx_csum); - } else - if (ni_string_eq(opt, "sg")) { - ni_parse_ethtool_onoff(val, ð->offload.scatter_gather); - } else - if (ni_string_eq(opt, "tso")) { - ni_parse_ethtool_onoff(val, ð->offload.tso); - } else - if (ni_string_eq(opt, "ufo")) { - ni_parse_ethtool_onoff(val, ð->offload.ufo); - } else - if (ni_string_eq(opt, "gso")) { - ni_parse_ethtool_onoff(val, ð->offload.gso); - } else - if (ni_string_eq(opt, "gro")) { - ni_parse_ethtool_onoff(val, ð->offload.gro); - } else - if (ni_string_eq(opt, "lro")) { - ni_parse_ethtool_onoff(val, ð->offload.lro); + if (offload) { + if (ni_string_eq(opt, "rx")) { + ni_parse_ethtool_onoff(val, &offload->rx_csum); + } else + if (ni_string_eq(opt, "tx")) { + ni_parse_ethtool_onoff(val, &offload->tx_csum); + } else + if (ni_string_eq(opt, "sg")) { + ni_parse_ethtool_onoff(val, &offload->scatter_gather); + } else + if (ni_string_eq(opt, "tso")) { + ni_parse_ethtool_onoff(val, &offload->tso); + } else + if (ni_string_eq(opt, "ufo")) { + ni_parse_ethtool_onoff(val, &offload->ufo); + } else + if (ni_string_eq(opt, "gso")) { + ni_parse_ethtool_onoff(val, &offload->gso); + } else + if (ni_string_eq(opt, "gro")) { + ni_parse_ethtool_onoff(val, &offload->gro); + } else + if (ni_string_eq(opt, "lro")) { + ni_parse_ethtool_onoff(val, &offload->lro); + } } } @@ -1470,7 +1480,7 @@ if (ni_string_eq(type, "-K") || ni_string_eq(type, "--offload")) { for (i = start; (i + 1) < opts->count; i+=2) { - try_add_ethtool_offload(dev, opts->data[i], + try_add_ethtool_offload(&dev->ethernet->offload, opts->data[i], opts->data[i + 1]); } } else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/compile new/wicked-0.6.12/compile --- old/wicked-0.6.11/compile 1970-01-01 01:00:00.000000000 +0100 +++ new/wicked-0.6.12/compile 2014-10-10 14:14:07.000000000 +0200 @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey <[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, 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, see <http://www.gnu.org/licenses/>. + +# 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. + +# This file is maintained in Automake, please report +# bugs to <[email protected]> or send patches to +# <[email protected]>. + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to <[email protected]>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/include/wicked/ethernet.h new/wicked-0.6.12/include/wicked/ethernet.h --- old/wicked-0.6.11/include/wicked/ethernet.h 2014-09-09 18:04:15.000000000 +0200 +++ new/wicked-0.6.12/include/wicked/ethernet.h 2014-10-10 14:05:20.000000000 +0200 @@ -44,6 +44,17 @@ ni_hwaddr_t sopass; } ni_ethernet_wol_t; +typedef struct ni_ethtool_offload { + ni_tristate_t rx_csum; + ni_tristate_t tx_csum; + ni_tristate_t scatter_gather; + ni_tristate_t tso; + ni_tristate_t ufo; + ni_tristate_t gso; + ni_tristate_t gro; + ni_tristate_t lro; +} ni_ethtool_offload_t; + struct ni_ethernet { ni_hwaddr_t permanent_address; unsigned int link_speed; @@ -52,17 +63,7 @@ ni_tristate_t autoneg_enable; ni_ethernet_wol_t wol; - - struct { - ni_tristate_t rx_csum; - ni_tristate_t tx_csum; - ni_tristate_t scatter_gather; - ni_tristate_t tso; - ni_tristate_t ufo; - ni_tristate_t gso; - ni_tristate_t gro; - ni_tristate_t lro; - } offload; + ni_ethtool_offload_t offload; unsigned int identify_time; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/missing new/wicked-0.6.12/missing --- old/wicked-0.6.11/missing 2014-09-26 17:05:25.000000000 +0200 +++ new/wicked-0.6.12/missing 2014-10-10 14:14:07.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. @@ -160,7 +160,7 @@ ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/src/bonding.c new/wicked-0.6.12/src/bonding.c --- old/wicked-0.6.11/src/bonding.c 2013-11-28 12:38:08.000000000 +0100 +++ new/wicked-0.6.12/src/bonding.c 2014-10-10 14:05:20.000000000 +0200 @@ -447,11 +447,13 @@ ni_bool_t ni_bonding_add_slave(ni_bonding_t *bonding, const char *ifname) { - if (!bonding || !ifname || !*ifname) + if (!bonding || ni_string_empty(ifname)) return FALSE; - if (ni_bonding_has_slave(bonding, ifname)) - return FALSE; + if (ni_bonding_has_slave(bonding, ifname)) { + ni_warn("Bonding slave %s already exists", ifname); + return TRUE; + } return ni_string_array_append(&bonding->slave_names, ifname) == 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/src/dbus-objects/ethernet.c new/wicked-0.6.12/src/dbus-objects/ethernet.c --- old/wicked-0.6.11/src/dbus-objects/ethernet.c 2014-09-26 16:50:12.000000000 +0200 +++ new/wicked-0.6.12/src/dbus-objects/ethernet.c 2014-10-10 14:05:20.000000000 +0200 @@ -339,11 +339,149 @@ return TRUE; } +static dbus_bool_t +__ni_objectmodel_ethernet_get_link_speed(const ni_dbus_object_t *object, + const ni_dbus_property_t *property, + ni_dbus_variant_t *result, + DBusError *error) +{ + const ni_ethernet_t *eth; + + if (!(eth = __ni_objectmodel_ethernet_read_handle(object, error))) + return FALSE; + + if (eth->link_speed == 0 /* || eth->link_speed == 65535 */) + return FALSE; + + ni_dbus_variant_set_uint32(result, eth->link_speed); + return TRUE; +} + +static dbus_bool_t +__ni_objectmodel_ethernet_set_link_speed(ni_dbus_object_t *object, + const ni_dbus_property_t *property, + const ni_dbus_variant_t *argument, + DBusError *error) +{ + ni_ethernet_t *eth; + + if (!(eth = __ni_objectmodel_ethernet_write_handle(object, error))) + return FALSE; + + return ni_dbus_variant_get_uint32(argument, ð->link_speed); +} + +static dbus_bool_t +__ni_objectmodel_ethernet_get_port_type(const ni_dbus_object_t *object, + const ni_dbus_property_t *property, + ni_dbus_variant_t *result, + DBusError *error) +{ + const ni_ethernet_t *eth; + + if (!(eth = __ni_objectmodel_ethernet_read_handle(object, error))) + return FALSE; + + if (eth->port_type == NI_ETHERNET_PORT_DEFAULT) + return FALSE; + + ni_dbus_variant_set_uint32(result, eth->port_type); + return TRUE; +} + +static dbus_bool_t +__ni_objectmodel_ethernet_set_port_type(ni_dbus_object_t *object, + const ni_dbus_property_t *property, + const ni_dbus_variant_t *argument, + DBusError *error) +{ + ni_ethernet_t *eth; + + if (!(eth = __ni_objectmodel_ethernet_write_handle(object, error))) + return FALSE; + + return ni_dbus_variant_get_uint32(argument, ð->port_type); +} + +static dbus_bool_t +__ni_objectmodel_ethernet_get_duplex(const ni_dbus_object_t *object, + const ni_dbus_property_t *property, + ni_dbus_variant_t *result, + DBusError *error) +{ + const ni_ethernet_t *eth; + + if (!(eth = __ni_objectmodel_ethernet_read_handle(object, error))) + return FALSE; + + switch (eth->duplex) { + case NI_ETHERNET_DUPLEX_DEFAULT: + case NI_ETHERNET_DUPLEX_NONE: + return FALSE; + default: + ni_dbus_variant_set_uint32(result, eth->duplex); + return TRUE; + } +} + +static dbus_bool_t +__ni_objectmodel_ethernet_set_duplex(ni_dbus_object_t *object, + const ni_dbus_property_t *property, + const ni_dbus_variant_t *argument, + DBusError *error) +{ + ni_ethernet_t *eth; + + if (!(eth = __ni_objectmodel_ethernet_write_handle(object, error))) + return FALSE; + + return ni_dbus_variant_get_uint32(argument, ð->duplex); +} + +static dbus_bool_t +__ni_objectmodel_ethernet_get_autoneg_enable(const ni_dbus_object_t *object, + const ni_dbus_property_t *property, + ni_dbus_variant_t *result, + DBusError *error) +{ + const ni_ethernet_t *eth; + + if (!(eth = __ni_objectmodel_ethernet_read_handle(object, error))) + return FALSE; + + if (!ni_tristate_is_set(eth->autoneg_enable)) + return FALSE; + ni_dbus_variant_set_int32(result, eth->autoneg_enable); + return TRUE; +} + +static dbus_bool_t +__ni_objectmodel_ethernet_set_autoneg_enable(ni_dbus_object_t *object, + const ni_dbus_property_t *property, + const ni_dbus_variant_t *argument, + DBusError *error) +{ + ni_ethernet_t *eth; + int32_t value; + + if (!(eth = __ni_objectmodel_ethernet_write_handle(object, error))) + return FALSE; + + eth->autoneg_enable = NI_TRISTATE_DEFAULT; + if (ni_dbus_variant_get_int32(argument, &value)) { + if (value != NI_TRISTATE_DEFAULT) + ni_tristate_set(ð->autoneg_enable, value); + return TRUE; + } + return FALSE; +} #define ETHERNET_UINT_PROPERTY(dbus_name, member_name, rw) \ - NI_DBUS_GENERIC_UINT_PROPERTY(ethernet, dbus_name, member_name, rw) + ___NI_DBUS_PROPERTY(DBUS_TYPE_UINT32_AS_STRING, dbus_name, \ + member_name, __ni_objectmodel_ethernet, RO) #define ETHERNET_INT_PROPERTY(dbus_name, member_name, rw) \ - NI_DBUS_GENERIC_INT_PROPERTY(ethernet, dbus_name, member_name, rw) + ___NI_DBUS_PROPERTY(DBUS_TYPE_INT32_AS_STRING, dbus_name, \ + member_name, __ni_objectmodel_ethernet, RO) const ni_dbus_property_t ni_objectmodel_ethernet_property_table[] = { ETHERNET_UINT_PROPERTY(link-speed, link_speed, RO), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/src/dbus-objects/wireless.c new/wicked-0.6.12/src/dbus-objects/wireless.c --- old/wicked-0.6.11/src/dbus-objects/wireless.c 2014-09-09 17:17:01.000000000 +0200 +++ new/wicked-0.6.12/src/dbus-objects/wireless.c 2014-10-10 14:05:20.000000000 +0200 @@ -79,7 +79,6 @@ ni_netdev_t *dev; ni_wireless_t *wlan; ni_wireless_network_t *net; - dbus_bool_t rv = FALSE; if (!(dev = ni_objectmodel_unwrap_netif(object, error))) return FALSE; @@ -113,9 +112,6 @@ goto error; } - dbus_bool_t was_up = FALSE; - was_up = (wlan->assoc.state == NI_WIRELESS_ESTABLISHED); - switch (net->keymgmt_proto) { case NI_WIRELESS_KEY_MGMT_PSK: if (net->wpa_psk.passphrase == NULL) { @@ -158,21 +154,8 @@ goto error; } - if (!was_up || wlan->assoc.state == NI_WIRELESS_ESTABLISHED) { - rv = TRUE; - } else { - const ni_uuid_t *uuid; - - /* Link is not associated yet. Tell the caller to wait for an event. */ - uuid = ni_netdev_add_event_filter(dev, - (1 << NI_EVENT_LINK_ASSOCIATED) | - (1 << NI_EVENT_LINK_ASSOCIATION_LOST)); - rv = __ni_objectmodel_return_callback_info(reply, NI_EVENT_LINK_ASSOCIATED, - uuid, NULL, error); - } - ni_wireless_network_put(net); - return rv; + return TRUE; error: ni_wireless_network_put(net); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/src/ethernet.c new/wicked-0.6.12/src/ethernet.c --- old/wicked-0.6.11/src/ethernet.c 2014-09-26 16:50:12.000000000 +0200 +++ new/wicked-0.6.12/src/ethernet.c 2014-10-10 14:05:20.000000000 +0200 @@ -63,8 +63,10 @@ ADVERTISED_40000baseSR4_Full | \ ADVERTISED_40000baseLR4_Full) -static int __ni_system_ethernet_get(const char *, ni_ethernet_t *); -static int __ni_system_ethernet_set(const char *, const ni_ethernet_t *); +static void __ni_system_ethernet_get(const char *, ni_ethernet_t *); +static void __ni_system_ethernet_set(const char *, ni_ethernet_t *); +static int __ni_ethtool_get_gset(const char *, ni_ethernet_t *); +static void ni_ethtool_offload_init(ni_ethtool_offload_t *); /* * Allocate ethernet struct @@ -79,14 +81,8 @@ ether->wol.options = __NI_ETHERNET_WOL_DEFAULT; ni_link_address_init(ðer->wol.sopass); ether->autoneg_enable = NI_TRISTATE_DEFAULT; - ether->offload.rx_csum = NI_TRISTATE_DEFAULT; - ether->offload.tx_csum = NI_TRISTATE_DEFAULT; - ether->offload.scatter_gather = NI_TRISTATE_DEFAULT; - ether->offload.tso = NI_TRISTATE_DEFAULT; - ether->offload.ufo = NI_TRISTATE_DEFAULT; - ether->offload.gso = NI_TRISTATE_DEFAULT; - ether->offload.gro = NI_TRISTATE_DEFAULT; - ether->offload.lro = NI_TRISTATE_DEFAULT; + ni_ethtool_offload_init(ðer->offload); + return ether; } @@ -260,23 +256,9 @@ #endif static __ni_ioctl_info_t __ethtool_gflags = { ETHTOOL_GFLAGS, "GFLAGS" }; -static __ni_ioctl_info_t __ethtool_grxcsum = { ETHTOOL_GRXCSUM, "GRXCSUM" }; -static __ni_ioctl_info_t __ethtool_gtxcsum = { ETHTOOL_GTXCSUM, "GTXCSUM" }; -static __ni_ioctl_info_t __ethtool_gsg = { ETHTOOL_GSG, "GSG" }; -static __ni_ioctl_info_t __ethtool_gtso = { ETHTOOL_GTSO, "GTSO" }; -static __ni_ioctl_info_t __ethtool_gufo = { ETHTOOL_GUFO, "GUFO" }; -static __ni_ioctl_info_t __ethtool_ggso = { ETHTOOL_GGSO, "GGSO" }; -static __ni_ioctl_info_t __ethtool_ggro = { ETHTOOL_GGRO, "GGRO" }; +static __ni_ioctl_info_t __ethtool_sflags = { ETHTOOL_SFLAGS, "SFLAGS" }; static __ni_ioctl_info_t __ethtool_gstrings = { ETHTOOL_GSTRINGS, "GSTRINGS" }; static __ni_ioctl_info_t __ethtool_gstats = { ETHTOOL_GSTATS, "GSTATS" }; -static __ni_ioctl_info_t __ethtool_sflags = { ETHTOOL_SFLAGS, "SFLAGS" }; -static __ni_ioctl_info_t __ethtool_srxcsum = { ETHTOOL_SRXCSUM, "SRXCSUM" }; -static __ni_ioctl_info_t __ethtool_stxcsum = { ETHTOOL_STXCSUM, "STXCSUM" }; -static __ni_ioctl_info_t __ethtool_ssg = { ETHTOOL_SSG, "SSG" }; -static __ni_ioctl_info_t __ethtool_stso = { ETHTOOL_STSO, "STSO" }; -static __ni_ioctl_info_t __ethtool_sufo = { ETHTOOL_SUFO, "SUFO" }; -static __ni_ioctl_info_t __ethtool_sgso = { ETHTOOL_SGSO, "SGSO" }; -static __ni_ioctl_info_t __ethtool_sgro = { ETHTOOL_SGRO, "SGRO" }; static __ni_ioctl_info_t __ethtool_gwol = { ETHTOOL_GWOL, "GWOL" }; static __ni_ioctl_info_t __ethtool_swol = { ETHTOOL_SWOL, "SWOL" }; @@ -520,6 +502,116 @@ return 0; } +static void +ni_ethtool_offload_init(ni_ethtool_offload_t *offload) +{ + if (offload) { + offload->rx_csum = NI_TRISTATE_DEFAULT; + offload->tx_csum = NI_TRISTATE_DEFAULT; + offload->scatter_gather = NI_TRISTATE_DEFAULT; + offload->tso = NI_TRISTATE_DEFAULT; + offload->ufo = NI_TRISTATE_DEFAULT; + offload->gso = NI_TRISTATE_DEFAULT; + offload->gro = NI_TRISTATE_DEFAULT; + offload->lro = NI_TRISTATE_DEFAULT; + } +} + +static int +__ni_ethtool_get_offload(const char *ifname, ni_ethtool_offload_t *offload) +{ + __ni_ioctl_info_t __ethtool_grxcsum = { ETHTOOL_GRXCSUM, "GRXCSUM" }; + __ni_ioctl_info_t __ethtool_gtxcsum = { ETHTOOL_GTXCSUM, "GTXCSUM" }; + __ni_ioctl_info_t __ethtool_gsg = { ETHTOOL_GSG, "GSG" }; + __ni_ioctl_info_t __ethtool_gtso = { ETHTOOL_GTSO, "GTSO" }; + __ni_ioctl_info_t __ethtool_gufo = { ETHTOOL_GUFO, "GUFO" }; + __ni_ioctl_info_t __ethtool_ggso = { ETHTOOL_GGSO, "GGSO" }; + __ni_ioctl_info_t __ethtool_ggro = { ETHTOOL_GGRO, "GGRO" }; + + int value; + + if (ni_string_empty(ifname) || !offload) + return -1; + + offload->rx_csum = __ni_ethtool_get_tristate(ifname, &__ethtool_grxcsum); + offload->tx_csum = __ni_ethtool_get_tristate(ifname, &__ethtool_gtxcsum); + offload->scatter_gather = __ni_ethtool_get_tristate(ifname, &__ethtool_gsg); + offload->tso = __ni_ethtool_get_tristate(ifname, &__ethtool_gtso); + offload->ufo = __ni_ethtool_get_tristate(ifname, &__ethtool_gufo); + offload->gso = __ni_ethtool_get_tristate(ifname, &__ethtool_ggso); + offload->gro = __ni_ethtool_get_tristate(ifname, &__ethtool_ggro); + + value = __ni_ethtool_get_value(ifname, &__ethtool_gflags); + if (value >= 0) { + offload->lro = (value & ETH_FLAG_LRO) ? + NI_TRISTATE_ENABLE : NI_TRISTATE_DISABLE; + } + + return 0; +} + +static int +__ni_ethtool_set_offload(const char *ifname, ni_ethtool_offload_t *offload) +{ + __ni_ioctl_info_t __ethtool_srxcsum = { ETHTOOL_SRXCSUM, "SRXCSUM" }; + __ni_ioctl_info_t __ethtool_stxcsum = { ETHTOOL_STXCSUM, "STXCSUM" }; + __ni_ioctl_info_t __ethtool_ssg = { ETHTOOL_SSG, "SSG" }; + __ni_ioctl_info_t __ethtool_stso = { ETHTOOL_STSO, "STSO" }; + __ni_ioctl_info_t __ethtool_sufo = { ETHTOOL_SUFO, "SUFO" }; + __ni_ioctl_info_t __ethtool_sgso = { ETHTOOL_SGSO, "SGSO" }; + __ni_ioctl_info_t __ethtool_sgro = { ETHTOOL_SGRO, "SGRO" }; + + if (ni_string_empty(ifname) || !offload) + return -1; + + __ni_ethtool_set_tristate(ifname, &__ethtool_srxcsum, offload->rx_csum); + __ni_ethtool_set_tristate(ifname, &__ethtool_stxcsum, offload->tx_csum); + __ni_ethtool_set_tristate(ifname, &__ethtool_ssg, offload->scatter_gather); + __ni_ethtool_set_tristate(ifname, &__ethtool_stso, offload->tso); + __ni_ethtool_set_tristate(ifname, &__ethtool_sufo, offload->ufo); + __ni_ethtool_set_tristate(ifname, &__ethtool_sgso, offload->gso); + __ni_ethtool_set_tristate(ifname, &__ethtool_sgro, offload->gro); + + if (offload->lro != NI_TRISTATE_DEFAULT) { + int value = __ni_ethtool_get_value(ifname, &__ethtool_gflags); + + if (value >= 0) { + if (offload->lro == NI_TRISTATE_ENABLE) + value |= ETH_FLAG_LRO; + else + value &= ~ETH_FLAG_LRO; + } + + __ni_ethtool_set_value(ifname, &__ethtool_sflags, value); + } + + return 0; +} + +static int +__ni_ethtool_get_permanent_address(const char *ifname, ni_hwaddr_t *perm_addr) +{ + struct { + struct ethtool_perm_addr h; + unsigned char data[NI_MAXHWADDRLEN]; + } parm; + + if (ni_string_empty(ifname) || !perm_addr) + return -1; + + memset(&parm, 0, sizeof(parm)); + parm.h.size = sizeof(parm.data); + if (__ni_ethtool(ifname, ETHTOOL_GPERMADDR, &parm) < 0) { + ni_debug_ifconfig("%s: ETHTOOL_GPERMADDR failed", ifname); + return -1; + } + else if (ni_link_address_length(perm_addr->type) == parm.h.size) { + ni_link_address_set(perm_addr, perm_addr->type, parm.data, parm.h.size); + } + + return 0; +} + /* * Handle ethtool stats */ @@ -560,27 +652,42 @@ /* * Get ethtool settings from the kernel */ -int +void __ni_system_ethernet_refresh(ni_netdev_t *dev) { ni_ethernet_t *ether; ether = ni_ethernet_new(); ether->permanent_address.type = dev->link.hwaddr.type; - if (__ni_system_ethernet_get(dev->name, ether) < 0) { - ni_ethernet_free(ether); - return -1; - } + __ni_system_ethernet_get(dev->name, ether); ni_netdev_set_ethernet(dev, ether); - return 0; } -int +void __ni_system_ethernet_get(const char *ifname, ni_ethernet_t *ether) { + __ni_ethtool_get_wol(ifname, ðer->wol); + __ni_ethtool_get_offload(ifname, ðer->offload); + __ni_ethtool_get_permanent_address(ifname, ðer->permanent_address); + __ni_ethtool_get_gset(ifname, ether); +} + +/* + * Write ethtool settings back to kernel + */ +void +__ni_system_ethernet_update(ni_netdev_t *dev, ni_ethernet_t *ether) +{ + __ni_system_ethernet_set(dev->name, ether); + __ni_system_ethernet_refresh(dev); +} + +static int +__ni_ethtool_get_gset(const char *ifname, ni_ethernet_t *ether) +{ struct ethtool_cmd ecmd; - int mapped, value; + int mapped; memset(&ecmd, 0, sizeof(ecmd)); if (__ni_ethtool(ifname, ETHTOOL_GSET, &ecmd) < 0) { @@ -609,61 +716,17 @@ else ether->port_type = mapped; - ether->autoneg_enable = (ecmd.autoneg? NI_TRISTATE_ENABLE : NI_TRISTATE_DISABLE); + ether->autoneg_enable = (ecmd.autoneg ? NI_TRISTATE_ENABLE : NI_TRISTATE_DISABLE); /* Not used yet: phy_address transceiver */ - __ni_ethtool_get_wol(ifname, ðer->wol); - - ether->offload.rx_csum = __ni_ethtool_get_tristate(ifname, &__ethtool_grxcsum); - ether->offload.tx_csum = __ni_ethtool_get_tristate(ifname, &__ethtool_gtxcsum); - ether->offload.scatter_gather = __ni_ethtool_get_tristate(ifname, &__ethtool_gsg); - ether->offload.tso = __ni_ethtool_get_tristate(ifname, &__ethtool_gtso); - ether->offload.ufo = __ni_ethtool_get_tristate(ifname, &__ethtool_gufo); - ether->offload.gso = __ni_ethtool_get_tristate(ifname, &__ethtool_ggso); - ether->offload.gro = __ni_ethtool_get_tristate(ifname, &__ethtool_ggro); - - value = __ni_ethtool_get_value(ifname, &__ethtool_gflags); - if (value >= 0) - ether->offload.lro = (value & ETH_FLAG_LRO)? NI_TRISTATE_ENABLE : NI_TRISTATE_DISABLE; - - /* Get the permanent address */ - { - struct { - struct ethtool_perm_addr h; - unsigned char data[NI_MAXHWADDRLEN]; - } parm; - - memset(&parm, 0, sizeof(parm)); - parm.h.size = sizeof(parm.data); - if (__ni_ethtool(ifname, ETHTOOL_GPERMADDR, &parm) < 0) { - ni_debug_ifconfig("%s: ETHTOOL_GPERMADDR failed", ifname); - } else - if (ni_link_address_length(ether->permanent_address.type) == parm.h.size) { - ni_link_address_set(ðer->permanent_address, - ether->permanent_address.type, - parm.data, parm.h.size); - } - } - return 0; } /* - * Write ethtool settings back to kernel - */ -int -__ni_system_ethernet_update(ni_netdev_t *dev, const ni_ethernet_t *ether) -{ - __ni_system_ethernet_set(dev->name, ether); - - return __ni_system_ethernet_refresh(dev); -} - -/* * Based on ecmd.speed and ecmd.duplex, determine ecmd.advertising. */ static void @@ -724,15 +787,11 @@ } } -int -__ni_system_ethernet_set(const char *ifname, const ni_ethernet_t *ether) +static int +__ni_ethtool_set_sset(const char *ifname, const ni_ethernet_t *ether) { struct ethtool_cmd ecmd; - int mapped, value; - - if (__ni_ethtool_set_wol(ifname, ðer->wol) < 0) { - ; /* do not fail completely, error is logged */ - } + int mapped; memset(&ecmd, 0, sizeof(ecmd)); if (__ni_ethtool(ifname, ETHTOOL_GSET, &ecmd) < 0) { @@ -777,34 +836,23 @@ transceiver */ - __ni_ethtool_set_tristate(ifname, &__ethtool_srxcsum, ether->offload.rx_csum); - __ni_ethtool_set_tristate(ifname, &__ethtool_stxcsum, ether->offload.tx_csum); - __ni_ethtool_set_tristate(ifname, &__ethtool_ssg, ether->offload.scatter_gather); - __ni_ethtool_set_tristate(ifname, &__ethtool_stso, ether->offload.tso); - __ni_ethtool_set_tristate(ifname, &__ethtool_sufo, ether->offload.ufo); - __ni_ethtool_set_tristate(ifname, &__ethtool_sgso, ether->offload.gso); - __ni_ethtool_set_tristate(ifname, &__ethtool_sgro, ether->offload.gro); - - if (ether->offload.lro != NI_TRISTATE_DEFAULT) { - value = __ni_ethtool_get_value(ifname, &__ethtool_gflags); - if (value >= 0) { - if (ether->offload.lro == NI_TRISTATE_ENABLE) - value |= ETH_FLAG_LRO; - else - value &= ~ETH_FLAG_LRO; - } - __ni_ethtool_set_value(ifname, &__ethtool_sflags, value); - } - __ni_system_ethernet_set_advertising(ifname, &ecmd); if (__ni_ethtool(ifname, ETHTOOL_SSET, &ecmd) < 0) { if (errno != EOPNOTSUPP) - ni_warn("%s: ETHTOOL_GSET failed: %m", ifname); + ni_warn("%s: ETHTOOL_SSET failed: %m", ifname); else - ni_debug_ifconfig("%s: ETHTOOL_GSET: %m", ifname); + ni_debug_ifconfig("%s: ETHTOOL_SSET: %m", ifname); return -1; } return 0; } + +void +__ni_system_ethernet_set(const char *ifname, ni_ethernet_t *ether) +{ + __ni_ethtool_set_wol(ifname, ðer->wol); + __ni_ethtool_set_offload(ifname, ðer->offload); + __ni_ethtool_set_sset(ifname, ether); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/src/fsm.c new/wicked-0.6.12/src/fsm.c --- old/wicked-0.6.11/src/fsm.c 2014-09-26 16:50:12.000000000 +0200 +++ new/wicked-0.6.12/src/fsm.c 2014-10-10 14:05:20.000000000 +0200 @@ -1120,8 +1120,11 @@ /* Check if this child is already owned by the given parent. */ for (i = 0; i < parent->children.count; ++i) { - if (parent->children.data[i] == child) + if (parent->children.data[i] == child) { + if (xml_node_is_empty(child->config.node)) + ni_ifworker_generate_default_config(parent, child); return TRUE; + } } if (shared) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/src/ifconfig.c new/wicked-0.6.12/src/ifconfig.c --- old/wicked-0.6.11/src/ifconfig.c 2014-09-26 16:45:30.000000000 +0200 +++ new/wicked-0.6.12/src/ifconfig.c 2014-10-10 14:05:20.000000000 +0200 @@ -1296,10 +1296,7 @@ if (!dev || !cfg || !cfg->ethernet) return -1; - if (__ni_system_ethernet_update(dev, cfg->ethernet) < 0) { - ni_error("%s: failed to update ethernet device settings", dev->name); - return -1; - } + __ni_system_ethernet_update(dev, cfg->ethernet); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/src/netinfo_priv.h new/wicked-0.6.12/src/netinfo_priv.h --- old/wicked-0.6.11/src/netinfo_priv.h 2014-09-26 16:45:30.000000000 +0200 +++ new/wicked-0.6.12/src/netinfo_priv.h 2014-10-10 14:05:20.000000000 +0200 @@ -69,8 +69,8 @@ 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 *); +extern void __ni_system_ethernet_refresh(ni_netdev_t *); +extern void __ni_system_ethernet_update(ni_netdev_t *, ni_ethernet_t *); /* FIXME: These should go elsewhere, maybe runtime.h */ extern int __ni_system_interface_update_lease(ni_netdev_t *, ni_addrconf_lease_t **); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/src/wireless.c new/wicked-0.6.12/src/wireless.c --- old/wicked-0.6.11/src/wireless.c 2014-07-11 17:09:23.000000000 +0200 +++ new/wicked-0.6.12/src/wireless.c 2014-10-10 14:05:20.000000000 +0200 @@ -243,7 +243,6 @@ int ni_wireless_set_network(ni_netdev_t *dev, ni_wireless_network_t *net) { - int link_was_up = !!(dev->link.ifflags & NI_IFF_LINK_UP); ni_wireless_t *wlan; ni_wpa_interface_t *wpa_dev; @@ -280,9 +279,6 @@ ni_wireless_set_assoc_network(wlan, net); - if (!link_was_up) - return 0; - return ni_wpa_interface_associate(wpa_dev, net, wlan->conf.ap_scan); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wicked-0.6.11/wicked.spec new/wicked-0.6.12/wicked.spec --- old/wicked-0.6.11/wicked.spec 2014-09-26 17:05:37.000000000 +0200 +++ new/wicked-0.6.12/wicked.spec 2014-10-10 14:14:18.000000000 +0200 @@ -18,7 +18,7 @@ %define release_prefix %{?snapshot:%{snapshot}}%{!?snapshot:0} Name: wicked -Version: 0.6.11 +Version: 0.6.12 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]
