From d8f4b964da30a3172e739f6a407707b7c324b675 Mon Sep 17 00:00:00 2001
From: Gabriel Kerneis <kerneis@pps.jussieu.fr>
Date: Fri, 21 Jun 2013 16:53:06 +0000
Subject: [PATCH] babeld: new upstream release 1.4.2
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

INCOMPATIBLE CHANGE: the former option import_table is now a list in
/etc/config/babeld.

Default values for interface parameters, introduced in this release, are
not supported yet in UCI config.

19 June 2013: babeld-1.4.2

  * Extensive changes to the configuration parser.  It is now possible
    to set all command-line options from the configuration file, and
    to specify default values for interface parameters.
  * Allow redistributing routes from multiple kernel tables.  Thanks
    to Toke Høiland-Jørgensen.
  * Fix some whitespace issues in the configuration parser.
  * Fix a bug in the configuration parser that could give wrong values
    to some exotic interface parameters (channel and faraway).
  * Fix a bug that could cause some extra traffic at shutdown.  Thanks
    to Matthieu Boutier.
  * Under Linux, set rp_filter explicitly for all interfaces.  This
    avoids mysterious routing failures on distributions that set
    rp_filter by default.  Reported by Baptiste Jonglez.

SVN-Revision: 36990
---
 net/babel/Makefile            | 4 ++--
 net/babel/files/babeld.config | 5 +++--
 net/babel/files/babeld.init   | 8 +++++++-
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/net/babel/Makefile b/net/babel/Makefile
index d0a8363e9..9992efe21 100644
--- a/net/babel/Makefile
+++ b/net/babel/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=babeld
-PKG_VERSION:=1.4.1
+PKG_VERSION:=1.4.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.pps.univ-paris-diderot.fr/~jch/software/files/
-PKG_MD5SUM:=406bbd940e3a9019d832d20e277266f2
+PKG_MD5SUM:=a48e8129f221f66640ae1ccf73190991
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/net/babel/files/babeld.config b/net/babel/files/babeld.config
index ba60d9812..a4f00e68d 100644
--- a/net/babel/files/babeld.config
+++ b/net/babel/files/babeld.config
@@ -23,8 +23,9 @@ config general
 	## option 'keep_unfeasible' 'false'
 	# Use the given kernel routing table for routes inserted by babeld.
 	## option 'export_table' '0'
-	# Export routes from the given kernel routing table.
-	## option 'import_table' '0'
+	# Export routes from the given kernel routing tables.
+	## list 'import_table' '0'
+	## list 'import_table' '42'
 	# The configuration file is not necessary since you can do everything
 	# from this file.
 	# option 'conf_file' '/etc/babeld.conf'
diff --git a/net/babel/files/babeld.init b/net/babel/files/babeld.init
index d33f21370..43514a2ca 100755
--- a/net/babel/files/babeld.init
+++ b/net/babel/files/babeld.init
@@ -33,6 +33,12 @@ append_bool() {
 	[ "$_loctmp" -gt 0 ] && append args "$value"
 }
 
+append_switch() {
+	local value="$1"
+	local switch="$2"
+	append args "$switch $value"
+}
+
 append_parm() {
 	local section="$1"
 	local option="$2"
@@ -112,7 +118,7 @@ babel_config() {
 	append_parm "$cfg" 'debug' '-d'
 	append_parm "$cfg" 'local_server' '-g'
 	append_parm "$cfg" 'export_table' '-t'
-	append_parm "$cfg" 'import_table' '-T'
+	config_list_foreach "$cfg" 'import_table' append_switch '-T'
 	append_parm "$cfg" 'conf_file' '-c'
 	append_parm "$cfg" 'log_file' '-L'
 }
-- 
2.30.2