babeld: tweak configuration for source-specific features
authorGabriel Kerneis <kerneis@google.com>
Mon, 20 Apr 2015 08:47:49 +0000 (10:47 +0200)
committerGabriel Kerneis <kerneis@google.com>
Tue, 21 Apr 2015 08:29:58 +0000 (10:29 +0200)
- Enable ipv6-subtrees by default.
- Add UCI options to configure source-specific filters.

Signed-off-by: Gabriel Kerneis <kerneis@google.com>
babeld/Makefile
babeld/files/babeld.config
babeld/files/babeld.init

index 1607b049387c9536ae0c35e1d39449dd494d6d2b..ba8d14d7058fc3af90cf5b501cd152036be4ae0b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=babeld
 PKG_VERSION:=1.6.0
 
 PKG_NAME:=babeld
 PKG_VERSION:=1.6.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.pps.univ-paris-diderot.fr/~jch/software/files/
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.pps.univ-paris-diderot.fr/~jch/software/files/
index 15365961e3d854f0237fbb1f529a7c999832240b..fa22fd63cf1d2227d36bd08303534043905b5e2f 100644 (file)
@@ -13,6 +13,9 @@ config general
        # option 'debug' '1'
        # option 'local_port' '33123'
        # option 'log_file' '/var/log/babeld.log'
        # option 'debug' '1'
        # option 'local_port' '33123'
        # option 'log_file' '/var/log/babeld.log'
+       ## Enable ipv6-subtrees by default since OpenWrt should ship with a
+       ## recent enough kernel for it to work.
+       option 'ipv6_subtrees' 'true'
        ## This seems somewhat buggy on BB.  If you need only one
        ## import-table statement, "option import_table 42" should work.
        # list 'import_table' '42'
        ## This seems somewhat buggy on BB.  If you need only one
        ## import-table statement, "option import_table 42" should work.
        # list 'import_table' '42'
@@ -54,11 +57,12 @@ config filter
        option 'ignore' 'true'
        # Type
        option 'type'   'redistribute'
        option 'ignore' 'true'
        # Type
        option 'type'   'redistribute'
-       # Selectors: ip, eq, le, ge, neigh, id, proto, local, if
+       # Selectors: ip, eq, le, ge, src_ip, src_eq, src_le, src_ge, neigh, id,
+       # proto, local, if.
        option 'ip'     '0.0.0.0/0'
        option 'eq'     '0'
        option 'proto'  '3'
        option 'ip'     '0.0.0.0/0'
        option 'eq'     '0'
        option 'proto'  '3'
-       # Action 
+       # Action (one of: allow, deny, metric XXX, src-prefix XXX).
        option 'action' 'metric 128'
 
 # Notice that the 'local' selector is a boolean.
        option 'action' 'metric 128'
 
 # Notice that the 'local' selector is a boolean.
index 164d9670fa02fdfa68383a98f4f6f4668cfc455c..ae1e6786756734fc9f1a8e9ef8a6cc827de9ddcd 100755 (executable)
@@ -127,6 +127,10 @@ babel_filter() {
        append_parm "$cfg" 'eq' 'eq'
        append_parm "$cfg" 'le' 'le'
        append_parm "$cfg" 'ge' 'ge'
        append_parm "$cfg" 'eq' 'eq'
        append_parm "$cfg" 'le' 'le'
        append_parm "$cfg" 'ge' 'ge'
+       append_parm "$cfg" 'src_ip' 'src-ip'
+       append_parm "$cfg" 'src_eq' 'src-eq'
+       append_parm "$cfg" 'src_le' 'src-le'
+       append_parm "$cfg" 'src_ge' 'src-ge'
        append_parm "$cfg" 'neigh' 'neigh'
        append_parm "$cfg" 'id' 'id'
        append_parm "$cfg" 'proto' 'proto'
        append_parm "$cfg" 'neigh' 'neigh'
        append_parm "$cfg" 'id' 'id'
        append_parm "$cfg" 'proto' 'proto'