Compare commits

...

66 commits

Author SHA1 Message Date
Bastian Bittorf
ee12b0330f
Merge pull request #307 from HRogge/for-14.07
OONF 0.14.1-1
2017-12-13 12:41:49 +01:00
Henning Rogge
00ba1ea5fe Update OONF to 0.14.1-1 2017-06-13 11:00:08 +02:00
Henning Rogge
09735e0a16 Add v0.14.0 OONF 2017-06-06 16:48:18 +02:00
Bastian Bittorf
fb0203bc53 Merge pull request #236 from HRogge/for-14.07
Update to OONF version 0.13.0
2016-10-21 13:00:37 +02:00
Henning Rogge
11a23c28a3 Update to OONF version 0.13.0 2016-10-21 12:51:19 +02:00
Bastian Bittorf
aab1355501 Merge pull request #228 from HRogge/for-14.07
Update to OONF 0.12.4
2016-09-09 20:16:58 +02:00
Henning Rogge
fec97ee9af Update to OONF 0.12.4 2016-09-04 14:22:09 +02:00
Bastian Bittorf
43cf77fb15 Merge pull request #223 from HRogge/for-14.07
Update to OONF 0.12.3
2016-08-18 13:44:27 +02:00
Henning Rogge
77d934e4ea Update to OONF 0.12.3 2016-08-17 17:21:58 +02:00
Bastian Bittorf
48f8992987 Merge pull request #219 from HRogge/for-14.07
Update to OONF 0.12.2 + coverity fix
2016-08-09 13:15:17 +02:00
Henning Rogge
f9a9197d62 Update to OONF 0.12.2 + coverity fix 2016-08-01 11:58:35 +02:00
Bastian Bittorf
73c3b55495 Merge pull request #200 from HRogge/for-14.07
OONF v0.12.1
2016-06-20 11:57:06 +02:00
Henning Rogge
d962f7d397 OONF release 0.12.1 2016-06-07 11:20:52 +02:00
Henning Rogge
35dd7fdf5c Update to OONF 0.12.0 2016-05-31 09:02:51 +02:00
Bastian Bittorf
8558fac0c2 Merge pull request #189 from HRogge/for-14.07
For 14.07
2016-05-25 10:15:13 +02:00
Henning Rogge
2831cf1392 Update OONF to v0.11.7 2016-05-13 15:06:00 +02:00
Henning Rogge
77c76f9823 Update OONF to 0.11.6 2016-05-13 10:50:40 +02:00
Henning Rogge
2caae51450 Add remotecontrol plugin to selectable Olsrd2 plugins 2016-05-05 14:21:44 +01:00
Henning Rogge
a3f6a24f2e Add optional packages to OONF olsrd2 2016-05-05 14:00:01 +01:00
Bastian Bittorf
fddd88b1d3 Merge pull request #180 from HRogge/for-14.07
Update to OONF v0.11.4
2016-04-25 11:15:20 +02:00
Henning Rogge
465b4784bc Update to OONF v0.11.4 2016-04-25 08:23:31 +02:00
Bastian Bittorf
8fb50df995 Merge pull request #174 from HRogge/for-14.07
Update to OONF 0.11.3
2016-04-23 17:28:07 +02:00
Henning Rogge
777fcc18a4 Update to OONF 0.11.3 2016-04-19 12:31:19 +02:00
Bastian Bittorf
e2e9be7bd3 Merge pull request #164 from HRogge/for-14.07
Update to version 0.11.2
2016-03-19 16:40:16 +01:00
Henning Rogge
99f2c955b3 Update to version 0.11.2 2016-03-17 14:16:25 +01:00
Bastian Bittorf
4b0a4bd80b Merge pull request #161 from HRogge/for-14.07
Update to OONF 0.11.1
2016-03-13 16:23:58 +01:00
Henning Rogge
f6523a6ae9 Update to OONF 0.11.1 2016-03-12 00:47:32 +01:00
Bastian Bittorf
16e4720534 Merge pull request #153 from HRogge/for-14.07
For 14.07
2016-03-04 15:55:58 +01:00
Henning Rogge
5e24cbc069 Forgot to change to switch from os_socket to os_fd for OONF 2016-02-29 19:04:46 +01:00
Henning Rogge
7f970ae58d OONF version 0.11.0 2016-02-28 21:32:15 +01:00
Bastian Bittorf
2e704cd29e Merge pull request #138 from HRogge/for-14.07
update to v0.9.2
2015-09-09 01:40:19 +02:00
Henning Rogge
678ca49420 update to v0.9.2 2015-09-08 18:26:36 +02:00
Bastian Bittorf
0656bdac9b Merge pull request #127 from HRogge/for-14.07
OONF Init script fix for the case that /var/etc does not exist
2015-08-13 14:53:39 +02:00
Henning Rogge
3144a9028c Move OONF temporary config to /var/run 2015-08-12 16:59:30 +02:00
Henning Rogge
530e8c47db Merge remote-tracking branch 'openwrt/for-14.07' into for-14.07 2015-08-10 14:10:22 +02:00
Henning Rogge
0d7353bc70 OONF Init script fix for the case that /var/etc does not exist 2015-08-10 13:53:13 +02:00
Bastian Bittorf
7b166ede6e Merge pull request #124 from HRogge/for-14.07
Unified Openwrt startup scripts for OONF
2015-08-06 22:45:33 +02:00
Henning Rogge
a84e564f85 Unified Openwrt startup scripts for OONF 2015-08-06 22:31:56 +02:00
Bastian Bittorf
c8f5a485a7 Merge pull request #118 from HRogge/for-14.07
OONF v0.9.1 for barrier breaker
2015-08-05 16:21:31 +02:00
Henning Rogge
0db0048832 OONF v0.9.1 for barrier breaker 2015-08-05 13:14:44 +02:00
Bastian Bittorf
932b4ec738 Merge pull request #109 from westbywest/for-14.07
[olsrd] adapt init script for 0.6.8 (PingCmd option)
2015-07-03 19:59:51 +02:00
André Gaul
87d52fc40d [olsrd] adapt init script for 0.6.8 (PingCmd option)
olsrd 0.6.8 accepts a PingCmd parameter as of
http://olsr.org/git/?p=olsrd.git;a=commitdiff;h=0a26c52af3941eb9060b193cae5552f8d13fd28e.
The PingCmd is a string of the form "ping -c 1 -q %s" where %s is
replaced with an IP. This commit allows for '%' characters in an olsrd
option.
2015-07-01 17:30:48 -05:00
Bastian Bittorf
00e5c81841 olsrd: for14.07: 0.9.0.1 -> 0.9.0.2 (bugfix-release) 2015-07-01 21:34:13 +02:00
Bastian Bittorf
4a5132cc66 olsrd: Makefile version typo: 0.9.1 -> 0.9.0.1 2015-06-19 13:20:36 +02:00
Bastian Bittorf
212640f11d olsrd: 14.07-branch: bump to new version 0.9.1 (bugfixes)
We did a bug-fix release of olsrd v1.
It fixes a route-recalculation issue and at least one crash.

Everyone using olsrd v1 is strongly urged to upgrade, especially people
using Smart-Gateway.

The shortlog is appended.

0.9.0.1 -------------------------------------------------------------------

Ferry Huberts (3):
      neighbors: signal link changes when deleting a neighbor
      jsoninfo: do not output smart-gateway info when not enabled.
      txtinfo: do not output smart-gateway info when not enabled.

Henning Rogge (2):
      Update version after release of v0.9.0
      Release v0.9.0.1
2015-06-18 20:11:01 +02:00
Axel Neumann
c8aa5cd271 bmx6: bump to latest (auto tunOutTimeout) version 2015-06-16 15:21:36 +02:00
Bastian Bittorf
e0de429982 olsrd: bump to new release 0.9.0
see: https://lists.olsr.org/pipermail/olsr-dev/2015-June/007598.html

"Everyone using olsrd v1 is strongly urged to upgrade, especially people
using Smart-Gateway.

In this release the Multi-Smart-Gateway additions are declared stable.

Also, Smart-Gateway timeouts are now implemented, which is a major fix
to the Smart-Gateway system. These timeouts were missing ever since its
first implementation." (Ferry Huberts)
2015-06-12 21:34:01 +02:00
Axel Neumann
8e44826ef4 bmx6: bump to latest (--tunnel and --redistTable fixing) version 2015-06-05 10:50:31 +02:00
Pau
5d4ad63897 Merge pull request #68 from rogerpueyo/for-14.07
bmx6: update repository revision (bugfix)
2014-12-17 16:22:20 +01:00
Roger Pueyo Centelles
f6aa55e00a bmx6: update repository revision (bugfix) 2014-12-12 12:22:32 +01:00
Steven Barth
c08fe48bcd hnetd: stability and bug fixes 2014-09-26 09:34:15 +02:00
Casper Meijn
1a999ad02b babeld: create the directory for the config file before writing to it 2014-09-08 14:51:08 +02:00
Baptiste Jonglez
47f74d0041 babeld: Specify edge cases 2014-09-03 15:12:21 +02:00
Baptiste Jonglez
d26e5eb197 babeld: Backward compatibility with old config files
This allows to use the old syntax "config interface foo" for specifying an
interface.  The new syntax ("option ifname foo") takes precedence.

Also, old option names for the "general" section are translated
accordingly.  Exceptions are:

- 'hello_interval' and 'wired_hello_interval', which are now interface-specific;
- 'conf_file', since /etc/babeld.conf is now always used;

which are simply ignored.

Beware, the syntax for the 'diversity' option is not backward compatible.
2014-09-03 15:01:44 +02:00
Baptiste Jonglez
e30f3394d3 babeld: Update configuration file for new syntax 2014-09-03 15:01:44 +02:00
Baptiste Jonglez
8ff7cde48f babeld: Support default interface configuration
When a "section interface" does not have a "option ifname", all its
options are used as default interface options.
2014-09-03 15:01:44 +02:00
Baptiste Jonglez
06158b911e babeld: Take interface name from "option ifname"
Previously, we were using the name of the section as the interface name,
but this has several drawbacks:

- no "-" or other special characters are allowed in a section name,
  preventing some physical interface names to be specified this way
  (e.g. "tun-topeka" would not work)
- it is harder to support default interface options (no interface name)

This change is not backward compatible, but a later commit will fix that.
2014-09-03 15:01:44 +02:00
Baptiste Jonglez
a7a090d12e babeld: Handle ignore options 2014-09-03 15:01:44 +02:00
Baptiste Jonglez
bfbcaf87e6 babeld: Print an error when startup fails 2014-09-03 15:01:44 +02:00
Baptiste Jonglez
20004f09cb babeld: Generate a configuration file instead of passing cmdline arguments
This is the first step toward fixing issue #33.

This still lacks some features:

- no support for "ignore" options
- no backward compatibility for option names
- no support for default interface options
2014-09-03 15:01:44 +02:00
Baptiste Jonglez
6218a5ac03 babeld: Update to 1.5.1 2014-09-03 15:01:44 +02:00
Steven Barth
9a64273132 nat46: add map-t meta-package
Signed-off-by: Steven Barth <steven@midlink.org>
2014-09-02 13:57:19 +02:00
Steven Barth
1774c10dba hnetd: fix mdns-support
Signed-off-by: Steven Barth <steven@midlink.org>
2014-09-02 10:19:00 +02:00
Steven Barth
11ed2e8613 babels: update repository URL 2014-08-10 14:18:24 +02:00
Steven Barth
9d3c311fdd hnetd: fix ipv4 uplink detection 2014-07-31 17:41:23 +02:00
Steven Barth
d7616fd1f3 miniupnpd: fix integer conversion in NAT-PMP, update description
Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-30 15:51:05 +02:00
27 changed files with 799 additions and 145 deletions

View file

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=babeld
PKG_VERSION:=1.5.0
PKG_VERSION:=1.5.1
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:=ac884beb644792bdb79f0042755820ee
PKG_MD5SUM:=20e3284d5ad291d7ba2ad91d5b47de10
include $(INCLUDE_DIR)/package.mk

View file

@ -1,78 +1,69 @@
package babeld
# Configuration set in this file ends up in /var/etc/babeld.conf.
# Babeld is told to use both /etc/babeld.conf and /var/etc/babeld.conf, so
# you can use one or the other, or even both at the same time. If an
# option is defined in both files, the version in /var/etc/babeld.conf
# takes precedence.
# See "man babeld" for all available options ("Global options").
# Important: remember to use '_' instead of '-' in option names.
config general
# option 'multicast_address' 'ff02:0:0:0:0:0:1:6'
# option 'port' '6696'
# option 'state_file' '/var/lib/babel-state'
# option 'hello_interval' '4'
# option 'wired_hello_interval' '20'
# option 'diversity' '0,128'
# option 'smoothing_half_time' '4'
# option 'kernel_priority' '0'
# Do not use this option unless you know what you are doing, as it can
# cause persistent route flapping.
## option 'duplication_priority' '0'
# option 'carrier_sense' 'false'
# option 'assume_wireless' 'false'
# option 'no_split_horizon' 'false'
# option 'debug' '0'
# Listen for connections from a front-end, e.g. on port 33123.
## option 'local_server' '33123'
# option 'random_router_id' 'false'
# Keep unfeasible routes
## 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 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'
# option 'random_id' 'true'
# option 'debug' '1'
# option 'local_port' '33123'
# option 'log_file' '/var/log/babeld.log'
## This seems somewhat buggy on BB. If you need only one
## import-table statement, "option import_table 42" should work.
# list 'import_table' '42'
# list 'import_table' '100'
# You can use aliases (like lan, wlan) or real names (like eth0.0).
# If you use an alias, it must be already defined when babeld starts.
# Otherwise, the name is taken literally and the interface can be
# brought up later (useful for tunnels for instance).
config interface wlan
# Remove this line to enable babeld on this interface
config interface
## Remove this line to enable babeld on this interface
option 'ignore' 'true'
# option 'wired' 'auto'
# option 'link_quality' 'auto'
# option 'split_horizon' 'auto'
# The default is 96 for wired interfaces, and 256 for wireless ones
## option 'rxcost' '256'
# The default is specified with the -h and -H command-line flags.
## option 'hello_interval' '4'
# This can be set to a fairly large value, unless significant
# packet loss is expected. The default is four times the hello
# interval.
## option 'update_interval' '16'
# Options to enable and configure RTT-based metric
## option 'enable_timestamps' 'false'
## option 'max_rtt_penalty' '0'
## option 'rtt_decay' '42'
## option 'rtt_min' '10'
## option 'rtt_max' '120'
## You can use aliases (like lan, wlan) or real names (like eth0.0).
## If you use an alias, it must be already defined when babeld starts.
## Otherwise, the name is taken literally and the interface can be
## brought up later (useful for tunnels for instance).
option 'ifname' 'wlan'
## You can set options, see babeld man page ("Interface configuration")
# option 'rxcost' '256'
# option 'hello_interval' '1'
config interface lan
config interface
option 'ignore' 'true'
## Physical interface name
option 'ifname' 'tun-example'
# option 'max_rtt_penalty' '90'
# A filter consists in a type ('in', 'out' or 'redistribute'), an action
# A config interface without "option ifname" will set default options
# for all interfaces. Interface-specific configuration always overrides
# default configuration.
config interface
# option 'enable_timestamps' 'true'
# option 'update_interval' '30'
# A filter consists of a type ('in', 'out' or 'redistribute'), an action
# ('allow', 'deny' or 'metric xxx') and a set of selectors ('ip', 'eq',
# etc.). See /etc/babeld.conf for more details.
# etc.). See babeld man page ("Filtering rules") for more details.
# Here is a sample filter wich redistributes the default route if its
# protocol number is "boot", e.g. when it installed by dhcp. It is
# disabled by default.
config filter
option 'ignore' 'true'
option 'ignore' 'true'
# Type
option 'type' 'redistribute'
option 'type' 'redistribute'
# Selectors: ip, eq, le, ge, neigh, id, proto, local, if
option 'ip' '0.0.0.0/0'
option 'le' '0'
option 'proto' '3'
option 'ip' '0.0.0.0/0'
option 'eq' '0'
option 'proto' '3'
# Action
option 'action' 'metric 128'
option 'action' 'metric 128'
# Notice that the 'local' selector is a boolean.
config filter
option 'ignore' 'true'
option 'type' 'redistribute'
option 'local' 'true'
# No action means "allow"

View file

@ -1,18 +1,35 @@
#!/bin/sh /etc/rc.common
. /lib/functions/network.sh
START=70
pidfile='/var/run/babeld.pid'
CONFIGFILE='/var/etc/babeld.conf'
OTHERCONFIGFILE="/etc/babeld.conf"
EXTRA_COMMANDS="status"
EXTRA_HELP=" status Dump Babel's table to the log file."
listen_ifname() {
local ifname=$(uci_get_state network "$1" ifname "$1")
local switch="$2"
append args "$switch $ifname"
append interfaces "$ifname"
# Options to ignore for the global section (old options that are translated
# for backward compatibility with old configuration files)
ignored_options="carrier_sense assume_wireless no_split_horizon random_router_id multicast_address port hello_interval wired_hello_interval smoothing_half_time duplication_priority local_server conf_file"
# Append a line to the configuration file
cfg_append() {
local value="$1"
echo "$value" >> $CONFIGFILE
}
cfg_append_option() {
local section="$1"
local option="$2"
local value
config_get value "$section" "$option"
# babeld convention for options is '-', not '_'
[ -n "$value" ] && cfg_append "${option//_/-} $value"
}
# Append to the "$buffer" variable
append_ifname() {
local section="$1"
local option="$2"
@ -21,7 +38,7 @@ append_ifname() {
config_get _name "$section" "$option"
[ -z "$_name" ] && return 0
local ifname=$(uci_get_state network "$_name" ifname "$_name")
append args "$switch $ifname"
append buffer "$switch $ifname"
}
append_bool() {
@ -30,13 +47,7 @@ append_bool() {
local value="$3"
local _loctmp
config_get_bool _loctmp "$section" "$option" 0
[ "$_loctmp" -gt 0 ] && append args "$value"
}
append_switch() {
local value="$1"
local switch="$2"
append args "$switch $value"
[ "$_loctmp" -gt 0 ] && append buffer "$value"
}
append_parm() {
@ -46,7 +57,57 @@ append_parm() {
local _loctmp
config_get _loctmp "$section" "$option"
[ -z "$_loctmp" ] && return 0
append args "$switch $_loctmp"
append buffer "$switch $_loctmp"
}
# Provides backward compatibility for old option names in the global section.
translate_option() {
local section="$1"
local old_option="$2"
local new_option="$3"
local _value
config_get _value "$section" "$old_option"
[ -z "$_value" ] && return
cfg_append "${new_option//_/-} $_value"
}
translate_bool() {
local section="$1"
local old_option="$2"
local new_option="$3"
local _bool
local _value
config_get_bool _bool "$section" "$old_option" 0
[ "$_bool" -eq 0 ] && return
cfg_append "${new_option//_/-} true"
}
# Adds a new interface section for setting default interface options.
add_default_option() {
local option="$1"
local value="$2"
cfg_append "default ${option//_/-} $value"
}
# Global 'hello_interval' and 'wired_hello_interval' options are ignored,
# because they have no direct equivalent: you should use
# interface-specific settings.
parse_old_global_options() {
local section="$1"
translate_bool "$section" 'carrier_sense' 'link_detect'
translate_bool "$section" 'random_router_id' 'random_id'
translate_option "$section" 'multicast_address' 'protocol_group'
translate_option "$section" 'port' 'protocol_port'
translate_option "$section" 'local_server' 'local_port'
translate_option "$section" 'smoothing_half_time' 'smoothing_half_life'
translate_option "$section" 'duplication_priority' 'allow_duplicates'
# These two global options are turned into default interface options.
local _bool
config_get_bool _bool "$section" 'assume_wireless' 0
[ "$_bool" -eq 1 ] && add_default_option "wired" "false"
config_get_bool _bool "$section" 'no_split_horizon' 0
[ "$_bool" -eq 1 ] && add_default_option "split_horizon" "false"
}
babel_filter() {
@ -56,9 +117,8 @@ babel_filter() {
local _ignored
config_get_bool _ignored "$cfg" 'ignore' 0
[ "$_ignored" -eq 1 ] && return 0
append args "-C '"
unset buffer
append_parm "$cfg" 'type' ''
append_bool "$cfg" 'local' 'local'
@ -75,69 +135,93 @@ babel_filter() {
append_parm "$cfg" 'action' ''
append args ' ' "'"
cfg_append "$buffer"
}
babel_addif() {
local cfg="$1"
local _ignored
config_get_bool _ignored "$cfg" 'ignore' 0
[ "$_ignored" -eq 1 ] && return 0
listen_ifname "$cfg" "-C 'interface"
append_parm "$cfg" 'wired' 'wired'
append_parm "$cfg" 'link_quality' 'link-quality'
append_parm "$cfg" 'split_horizon' 'split-horizon'
append_parm "$cfg" 'rxcost' 'rxcost'
append_parm "$cfg" 'hello_interval' 'hello-interval'
append_parm "$cfg" 'update_interval' 'update-interval'
append_parm "$cfg" 'enable_timestamps' 'enable-timestamps'
append_parm "$cfg" 'max_rtt_penalty' 'max-rtt-penalty'
append_parm "$cfg" 'rtt_decay' 'rtt-decay'
append_parm "$cfg" 'rtt_min' 'rtt-min'
append_parm "$cfg" 'rtt_max' 'rtt-max'
append args ' ' "'"
# Only one of babeld's options is allowed multiple times, "import-table".
# We just append it multiple times.
list_cb() {
option_cb "$@"
}
babel_config() {
local cfg="$1"
append_bool "$cfg" 'carrier_sense' '-l'
append_bool "$cfg" 'assume_wireless' '-w'
append_bool "$cfg" 'no_split_horizon' '-s'
append_bool "$cfg" 'keep_unfeasible' '-u'
append_bool "$cfg" 'random_router_id' '-r'
append_parm "$cfg" 'multicast_address' '-m'
append_parm "$cfg" 'port' '-p'
append_parm "$cfg" 'state_file' '-S'
append_parm "$cfg" 'hello_interval' '-h'
append_parm "$cfg" 'wired_hello_interval' '-H'
append_parm "$cfg" 'diversity' '-z'
append_parm "$cfg" 'smoothing_half_time' '-M'
append_parm "$cfg" 'kernel_priority' '-k'
append_parm "$cfg" 'duplication_priority' '-A'
append_parm "$cfg" 'debug' '-d'
append_parm "$cfg" 'local_server' '-g'
append_parm "$cfg" 'export_table' '-t'
config_list_foreach "$cfg" 'import_table' append_switch '-T'
append_parm "$cfg" 'conf_file' '-c'
append_parm "$cfg" 'log_file' '-L'
babel_config_cb() {
local type="$1"
local section="$2"
case "$type" in
"general")
option_cb() {
local option="$1"
local value="$2"
# Ignore old options
list_contains ignored_options "$option" && return
cfg_append "${option//_/-} $value"
}
;;
"interface")
local _ifname
config_get _ifname "$section" 'ifname'
# Backward compatibility: try to use the section name
# if no "option ifname" was used.
[ -z "$_ifname" -a "${section:0:3}" != "cfg" ] && _ifname="$section"
# Try to resolve the logical interface name
unset interface
network_get_device interface "$_ifname" || interface="$_ifname"
option_cb() {
local option="$1"
local value="$2"
local _interface
# "option ifname" is a special option, don't actually
# generate configuration for it.
[ "$option" = "ifname" ] && return
[ -n "$interface" ] && _interface="interface $interface" || _interface="default"
cfg_append "$_interface ${option//_/-} $value"
}
# Handle ignore options.
local _ignored
# This works because we loaded the whole configuration
# beforehand (see config_load below).
config_get_bool _ignored "$section" 'ignore' 0
if [ "$_ignored" -eq 1 ]
then
option_cb() { return; }
else
# Also include an empty "interface $interface" statement,
# so that babeld operates on this interface.
[ -n "$interface" ] && cfg_append "interface $interface"
fi
;;
*)
# Don't use reset_cb, this would also reset config_cb
option_cb() { return; }
;;
esac
}
start() {
mkdir -p /var/lib
mkdir -p /var/etc
# Start by emptying the generated config file
>"$CONFIGFILE"
# First load the whole config file, without callbacks, so that we are
# aware of all "ignore" options in the second pass.
config_load babeld
unset args
unset interfaces
config_foreach babel_config general
config_foreach babel_addif interface
# Parse general and interface sections thanks to the "config_cb()"
# callback. This allows to loop over all options without having to
# know their name in advance.
config_cb() { babel_config_cb "$@"; }
config_load babeld
# Backward compatibility
config_foreach parse_old_global_options general
# Parse filters separately, since we know which options we expect
config_foreach babel_filter filter
[ -z "$interfaces" ] && return 0
eval "/usr/sbin/babeld -D -I $pidfile $args $interfaces"
# Using multiple config files is supported since babeld 1.5.1
/usr/sbin/babeld -D -I "$pidfile" -c "$OTHERCONFIGFILE" -c "$CONFIGFILE"
# Wait for the pidfile to appear
for i in 1 2
do
[ -f "$pidfile" ] || sleep 1
done
[ -f "$pidfile" ] || (echo "Failed to start babeld"; exit 42)
}
stop() {

View file

@ -12,7 +12,7 @@ PKG_SOURCE_VERSION:=bc5d60e58e7ebd1694cef23d798df08b3b8f216f
PKG_VERSION:=2014-07-04-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://git.wifi.pps.univ-paris-diderot.fr/babels
PKG_SOURCE_URL:=https://github.com/boutier/babeld.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View file

@ -31,8 +31,8 @@ PKG_SOURCE_PROTO:=git
#PKG_SOURCE_URL:=git://bmx6.net/bmx6.git
PKG_SOURCE_URL:=git://github.com/axn/bmx6.git
PKG_REV:=8b0585e84ca8a0110bd4587e19192beda1ba3238
PKG_VERSION:=r2014052301
PKG_REV:=8f26909e8808ed7fab0359afc15a3e44563fbd40
PKG_VERSION:=r2015061604
PKG_RELEASE:=4
PKG_SOURCE_VERSION:=$(PKG_REV)
@ -48,7 +48,7 @@ TARGET_CFLAGS += $(FPIC)
MAKE_ARGS += \
EXTRA_CFLAGS="$(TARGET_CFLAGS) -I. -I$(STAGING_DIR)/usr/include -DNO_DEBUG_ALL -DNO_DEBUG_DUMP" \
EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib " \
REVISION_VERSION="$(PKG_REV)" \
GIT_REV="$(PKG_REV)" \
CC="$(TARGET_CC)" \
INSTALL_DIR="$(PKG_INSTALL_DIR)" \
STRIP="/bin/false" \

View file

@ -7,9 +7,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hnetd
PKG_SOURCE_VERSION:=0638c10c415563376aecb2017f6503eb6c6e3a90
PKG_VERSION:=2014-07-29-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=2
PKG_SOURCE_VERSION:=0c1d55d03983c726aaad010738236c2da64ca7df
PKG_VERSION:=2014-09-26-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/sbyx/hnetd.git

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpd
PKG_VERSION:=1.8.20140523
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@ -23,7 +23,7 @@ define Package/miniupnpd
SECTION:=net
CATEGORY:=Network
DEPENDS:=+iptables +libip4tc +IPV6:libip6tc +IPV6:ip6tables +libnfnetlink
TITLE:=Lightweight UPnP daemon
TITLE:=Lightweight UPnP IGD, NAT-PMP & PCP daemon
SUBMENU:=Firewall
URL:=http://miniupnp.free.fr/
endef

View file

@ -0,0 +1,11 @@
--- a/natpmp.c
+++ b/natpmp.c
@@ -54,7 +54,7 @@ INLINE void writenu32(uint8_t * p, uint3
#define WRITENU32(p, n) writenu32(p, n)
INLINE void writenu16(uint8_t * p, uint16_t n)
{
- p[0] = (n < 0xff00) >> 8;
+ p[0] = (n & 0xff00) >> 8;
p[1] = n & 0xff;
}
#define WRITENU16(p, n) writenu16(p, n)

View file

@ -21,6 +21,13 @@ PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
include $(INCLUDE_DIR)/package.mk
define Package/map-t
SECTION:=net
CATEGORY:=Network
DEPENDS:=+map +kmod-nat46
TITLE:=MAP-T configuration support
endef
define KernelPackage/nat46
DEPENDS:=+kmod-ipv6
TITLE:=Stateless NAT46 translation kernel module
@ -38,4 +45,9 @@ define Build/Compile
modules
endef
define Package/map-t/install
true
endef
$(eval $(call KernelPackage,nat46))
$(eval $(call BuildPackage,map-t))

View file

@ -8,14 +8,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=olsrd
PKG_VERSION:=0.6.6.2
PKG_RELEASE:=4
PKG_VERSION:=0.9.0.2
PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6
PKG_SOURCE_URL:=http://www.olsr.org/releases/0.9
PKG_MD5SUM:=e4e04bb033cffd99b3be397fa9063a54
PKG_MD5SUM:=8a2675c33990706cc291b59934024783
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=BSD-3-Clause
include $(INCLUDE_DIR)/package.mk

View file

@ -38,7 +38,7 @@ validate_varname() {
validate_olsrd_option() {
local str="$1"
[ -z "$str" -o "$str" != "${str%%[! 0-9A-Za-z./|:_-]*}" ] && return 1
[ -z "$str" -o "$str" != "${str%%[! 0-9A-Za-z.%/|:_-]*}" ] && return 1
return 0
}

67
oonf-dlep-proxy/Makefile Normal file
View file

@ -0,0 +1,67 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=oonf-dlep-proxy
PKG_VERSION:=0.14.1-1
PKG_REV:=d86825c0bdf144db706da444be7b0a2e8722b54d
PKG_RELEASE:=$(PKG_REV)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/OLSR/OONF.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_OPTIONS=-D OONF_NO_WERROR:Bool=true \
-D OONF_LOGGING_LEVEL:String=debug \
-D OONF_NO_TESTING:Bool=true \
-D UCI:Bool=true \
-D OONF_APP_DEFAULT_CFG_HANDLER:String=uci \
-D OONF_STATIC_PLUGINS:String="class;clock;layer2;packet_socket;socket;stream_socket;telnet;timer;viewer;os_clock;os_fd;os_interface;os_system;nl80211_listener;layer2info;systeminfo;cfg_uciloader;cfg_compact;dlep_proxy" \
-D OONF_LIB_GIT:String=v$(PKG_VERSION)-archive \
-D OONF_VERSION:String=$(PKG_VERSION) \
-D INSTALL_LIB_DIR:Path=lib/oonf \
-D INSTALL_INCLUDE_DIR:Path=include/oonf \
-D INSTALL_CMAKE_DIR:Path=lib/oonf \
-D CMAKE_PREFIX_PATH=$(STAGING_DIR)/usr
define Package/oonf-git/template
SECTION:=net
CATEGORY:=Network
MAINTAINER:=Henning Rogge <hrogge@gmail.com>
SUBMENU:=OLSR.org network framework
URL:=http://www.olsr.org/
endef
define Package/oonf-dlep-proxy
$(call Package/oonf-git/template)
TITLE:= Build DLEP Radio+Router Agent
DEPENDS:=+librt +libnl-tiny +libuci +oonf-init-scripts
VERSION:=$(PKG_VERSION)
endef
Build/Compile=$(call Build/Compile/Default,dlep_radio_static)
Build/Install=
define Build/Install
$(INSTALL_BIN) -D $(PKG_BUILD_DIR)/$(MAKE_PATH)/dlep_radio_static $(PKG_INSTALL_DIR)/usr/sbin/dlep_proxy;
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -I${STAGING_DIR}/usr/include/libnl-tiny
define Package/oonf-dlep-proxy/install
$(INSTALL_BIN) -D $(PKG_BUILD_DIR)/dlep_radio_static $(1)/usr/sbin/dlep_proxy
$(INSTALL_BIN) -D ./files/dlep_proxy.init $(1)/etc/init.d/dlep_proxy
$(INSTALL_BIN) -D ./files/dlep_proxy.hotplug $(1)/etc/hotplug.d/iface/50-dlep_proxy
$(INSTALL_DATA) -D ./files/dlep_proxy.uci $(1)/etc/config/dlep_proxy
endef
define Package/oonf-dlep-proxy/conffiles
/etc/config/dlep_proxy
endef
$(eval $(call BuildPackage,oonf-dlep-proxy))

View file

@ -0,0 +1,5 @@
#!/bin/sh
DAEMON='dlep_proxy'
. /lib/functions/oonf_hotplug.sh

View file

@ -0,0 +1,6 @@
#!/bin/sh /etc/rc.common
START=82
DAEMON='dlep_proxy'
. /lib/functions/oonf_init.sh

View file

@ -0,0 +1,24 @@
config global
option 'failfast' 'no'
option 'pidfile' '/var/run/dlep_proxy.pid'
option 'lockfile' '/var/lock/dlep_proxy'
config log
option 'syslog' 'true'
option 'stderr' 'true'
# option 'file' '/var/log/dlep_proxy.log'
# option 'info' 'all'
# option 'debug' 'all'
config telnet
# option 'port' '2009'
#config dlep_radio
# list 'name' 'eth0'
# option 'datapath_if' 'eth1'
# option 'not_proxied' 'false'
# option 'proxied' 'true'
#config dlep-router
# list 'name' 'eth0'
# option 'datapath_if' 'eth0'

67
oonf-dlep-radio/Makefile Normal file
View file

@ -0,0 +1,67 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=oonf-dlep-radio
PKG_VERSION:=0.14.1-1
PKG_REV:=d86825c0bdf144db706da444be7b0a2e8722b54d
PKG_RELEASE:=$(PKG_REV)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/OLSR/OONF.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_OPTIONS=-D OONF_NO_WERROR:Bool=true \
-D OONF_LOGGING_LEVEL:String=debug \
-D OONF_NO_TESTING:Bool=true \
-D UCI:Bool=true \
-D OONF_APP_DEFAULT_CFG_HANDLER:String=uci \
-D OONF_STATIC_PLUGINS:String="class;clock;layer2;packet_socket;socket;stream_socket;telnet;timer;viewer;os_clock;os_fd;os_interface;os_system;nl80211_listener;layer2info;systeminfo;cfg_uciloader;cfg_compact;dlep_radio" \
-D OONF_LIB_GIT:String=v$(PKG_VERSION)-archive \
-D OONF_VERSION:String=$(PKG_VERSION) \
-D INSTALL_LIB_DIR:Path=lib/oonf \
-D INSTALL_INCLUDE_DIR:Path=include/oonf \
-D INSTALL_CMAKE_DIR:Path=lib/oonf \
-D CMAKE_PREFIX_PATH=$(STAGING_DIR)/usr
define Package/oonf-git/template
SECTION:=net
CATEGORY:=Network
MAINTAINER:=Henning Rogge <hrogge@gmail.com>
SUBMENU:=OLSR.org network framework
URL:=http://www.olsr.org/
endef
define Package/oonf-dlep-radio
$(call Package/oonf-git/template)
TITLE:= Build DLEP Radio Agent
DEPENDS:=+librt +libnl-tiny +libuci +oonf-init-scripts
VERSION:=$(PKG_VERSION)
endef
Build/Compile=$(call Build/Compile/Default,dlep_radio_static)
Build/Install=
define Build/Install
$(INSTALL_BIN) -D $(PKG_BUILD_DIR)/$(MAKE_PATH)/dlep_radio_static $(PKG_INSTALL_DIR)/usr/sbin/dlep_radio;
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -I${STAGING_DIR}/usr/include/libnl-tiny
define Package/oonf-dlep-radio/install
$(INSTALL_BIN) -D $(PKG_BUILD_DIR)/dlep_radio_static $(1)/usr/sbin/dlep_radio
$(INSTALL_BIN) -D ./files/dlep_radio.init $(1)/etc/init.d/dlep_radio
$(INSTALL_BIN) -D ./files/dlep_radio.hotplug $(1)/etc/hotplug.d/iface/50-dlep_radio
$(INSTALL_DATA) -D ./files/dlep_radio.uci $(1)/etc/config/dlep_radio
endef
define Package/oonf-dlep-radio/conffiles
/etc/config/dlep_radio
endef
$(eval $(call BuildPackage,oonf-dlep-radio))

View file

@ -0,0 +1,5 @@
#!/bin/sh
DAEMON='dlep_radio'
. /lib/functions/oonf_hotplug.sh

View file

@ -0,0 +1,6 @@
#!/bin/sh /etc/rc.common
START=82
DAEMON='dlep_radio'
. /lib/functions/oonf_init.sh

View file

@ -0,0 +1,24 @@
config global
option 'failfast' 'no'
option 'pidfile' '/var/run/dlep_radio.pid'
option 'lockfile' '/var/lock/dlep_radio'
config log
option 'syslog' 'true'
option 'stderr' 'true'
# option 'file' '/var/log/dlep_radio.log'
# option 'info' 'all'
# option 'debug' 'all'
config telnet
# option 'port' '2009'
config dlep_radio
list 'name' 'wlan0'
option 'datapath_if' 'br-lan'
option 'not_proxied' 'false'
option 'proxied' 'true'
config nl80211_listener
option 'if' 'wlan0'
option 'interval' '1.0'

View file

@ -0,0 +1,36 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=oonf-init-scripts
PKG_VERSION:=0.9.1-r3
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/oonf-init-scripts
SECTION:=net
CATEGORY:=Network
MAINTAINER:=Henning Rogge <hrogge@gmail.com>
SUBMENU:=OLSR.org network framework
URL:=http://www.olsr.org/
TITLE:= Common OONF startup scripts
VERSION:=$(PKG_VERSION)
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/oonf-init-scripts/install
$(INSTALL_BIN) -D ./files/oonf_init.sh $(1)/lib/functions/oonf_init.sh
$(INSTALL_BIN) -D ./files/oonf_hotplug.sh $(1)/lib/functions/oonf_hotplug.sh
endef
$(eval $(call BuildPackage,oonf-init-scripts))

View file

@ -0,0 +1,10 @@
#!/bin/sh
case "${ACTION}" in
ifup)
. /etc/rc.common /etc/init.d/${DAEMON} enabled && {
logger -t '${DAEMON}[hotplug]' -p daemon.info 'reloading configuration'
. /etc/rc.common /etc/init.d/${DAEMON} reload
}
;;
esac

View file

@ -0,0 +1,120 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
oonf_log()
{
logger -s -t ${DAEMON} -p daemon.info "${1}"
}
oonf_get_layer3_device()
{
local interface="${1}" # e.g. 'mywifi'
local status dev proto
local query="{ \"interface\" : \"${interface}\" }"
status="$( ubus -S call network.interface status "${query}" )" && {
json_load "${status}"
json_get_var 'dev' l3_device
json_get_var 'proto' proto
case "${proto}" in
pppoe)
# TODO: otherwise it segfaults
oonf_log "refusing to add '$interface', because of proto '${proto}'"
;;
*)
echo "${dev}" # e.g. 'wlan0-1'
;;
esac
}
}
oonf_add_devices_to_configuration()
{
local i=0
local device_name= section= interface= single_interface=
# make a copy of configuration and
# add a 'name' (physical name) for all
# 'interface-names' (e.g. mywifi)
#
# olsrd2.@interface[2]=interface
# olsrd2.@interface[2].ifname='wan lan wlanadhoc wlanadhocRADIO1'
# /var is in ramdisc/tmpfs
uci export ${DAEMON} >"/var/run/${DAEMON}_dev"
while section="$( uci -q -c /etc/config get "${DAEMON}.@[${i}]" )"; do {
echo "section: ${section}"
interface="$( uci -q -c /etc/config get "${DAEMON}.@[${i}].ifname" )" || {
i=$(( i + 1 ))
continue
}
case "$( uci -q get "${DAEMON}.@[${i}].ignore" )" in
1|on|true|enabled|yes)
oonf_log "removing/ignore section '$section'"
uci -q -c /var/run delete "${DAEMON}_dev.@[${j}]"
i=$(( i + 1 ))
continue
;;
esac
for single_interface in ${interface}; do {
device_name="$( oonf_get_layer3_device "${single_interface}" )"
echo "Interface: ${single_interface} = ${device_name}"
if [ ! -z "${device_name}" ]
then
# add option 'name' for 'ifname' (e.g. 'mywifi')
uci -q -c /var/run add_list "${DAEMON}_dev.@[${i}].name=${device_name}"
fi
} done
i=$(( $i + 1 ))
} done
uci -q -c /var/run commit "${DAEMON}_dev"
oonf_log "wrote '/var/run/${DAEMON}_dev'"
}
oonf_reread_config()
{
local pid
local pidfile="/var/run/${DAEMON}.pid"
if [ -e "${pidfile}" ]; then
read pid <"${pidfile}"
elif pidfile="$( uci -q get "${DAEMON}.@global[0].pidfile" )"; then
read pid <"${pidfile}"
fi
# if empty, ask kernel
pid="${pid:-$( pidof ${DAEMON} )}"
[ -n "${pid}" ] && kill -SIGHUP ${pid}
}
start()
{
oonf_add_devices_to_configuration
# produce coredumps
ulimit -c unlimited
service_start /usr/sbin/${DAEMON} --set global.fork=true --load uci:///var/run/${DAEMON}_dev
}
stop()
{
service_stop /usr/sbin/${DAEMON}
}
reload()
{
oonf_add_devices_to_configuration
oonf_reread_config
}

47
oonf-olsrd2/Config.in Normal file
View file

@ -0,0 +1,47 @@
# OONF Olsrd2 configuration
menu "Optional Plugins"
depends on PACKAGE_oonf-olsrd2
config OONF_NHDP_AUTOLL4
bool "Auto_LL4 plugin enabled"
help
The auto_ll4 plugin automatically generates linklocal IPv4 addresses on interfaces that do not contain IPv4 addresses.
default n
config OONF_OLSRV2_LAN_IMPORT
bool "Lan_import plugin enabled"
help
The lan_import plugin can read routing tables and automatically export them as locally attached networks in olsrd2.
default n
config OONF_OLSRV2_ROUTE_MODIFIER
bool "route_modifier plugin enabled"
help
The route_modifier plugin allows you to overwrite aspects of routes (like table/protocol) for certain destinations.
default n
config OONF_GENERIC_DLEP_ROUTER
bool "dlep_router plugin enabled"
help
The dlep_router plugin can receive linklayer metadata over the DLEP protocol.
default n
config OONF_GENERIC_REMOTECONTROL
bool "remotecontrol plugin enabled"
help
The remotecontrol plugin allows you to control configuration and logging over the telnet plugin. Be careful not to open this functionality over the network without securing it.
default n
config OONF_GENERIC_HTTP
bool "http plugin enabled"
help
The HTTP plugin allows HTTP access to all telnet commands.
default n
config OONF_OLSRV2_MPR
bool "MPR plugin enabled"
help
The MPR plugin reduce the routing graph to limit the overhead of the OLSRv2 protocol
default n
endmenu

87
oonf-olsrd2/Makefile Normal file
View file

@ -0,0 +1,87 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=oonf-olsrd2
PKG_VERSION:=0.14.1-1
PKG_REV:=d86825c0bdf144db706da444be7b0a2e8722b54d
PKG_RELEASE:=$(PKG_REV)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/OLSR/OONF.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
SPACE:=
SPACE+=
CMAKE_OPTIONAL_PLUGINS:= $(subst $(SPACE),;,$(strip \
$(if $(filter y,$(CONFIG_OONF_NHDP_AUTOLL4)),auto_ll4,) \
$(if $(filter y,$(CONFIG_OONF_OLSRV2_LAN_IMPORT)),lan_import,) \
$(if $(filter y,$(CONFIG_OONF_OLSRV2_ROUTE_MODIFIER)),route_modifier,) \
$(if $(filter y,$(CONFIG_OONF_GENERIC_DLEP_ROUTER)),dlep_router,) \
$(if $(filter y,$(CONFIG_OONF_GENERIC_REMOTECONTROL)),remotecontrol,) \
$(if $(filter y,$(CONFIG_OONF_OLSRV2_MPR)),mpr,) \
$(if $(filter y,$(CONFIG_OONF_GENERIC_HTTP)),http,) \
))
BUILD_TYPE:= $(if $(filter y,$(CONFIG_DEBUG)),Debug,Release)
CMAKE_OPTIONS=-D CMAKE_BUILD_TYPE:String=$(BUILD_TYPE) \
-D OONF_NO_WERROR:Bool=true \
-D OONF_LOGGING_LEVEL:String=debug \
-D OONF_NO_TESTING:Bool=true \
-D UCI:Bool=true \
-D OONF_APP_DEFAULT_CFG_HANDLER:String=uci \
-D OONF_STATIC_PLUGINS:String="class;clock;duplicate_set;layer2;packet_socket;rfc5444;socket;stream_socket;telnet;timer;viewer;os_clock;os_fd;os_interface;os_routing;os_system;nhdp;olsrv2;ff_dat_metric;neighbor_probing;nl80211_listener;link_config;layer2info;systeminfo;cfg_uciloader;cfg_compact;nhdpinfo;olsrv2info;netjsoninfo;${CMAKE_OPTIONAL_PLUGINS}" \
-D OONF_LIB_GIT:String=v$(PKG_VERSION)-archive \
-D OONF_VERSION:String=$(PKG_VERSION) \
-D INSTALL_LIB_DIR:Path=lib/oonf \
-D INSTALL_INCLUDE_DIR:Path=include/oonf \
-D INSTALL_CMAKE_DIR:Path=lib/oonf \
-D CMAKE_PREFIX_PATH=$(STAGING_DIR)/usr
define Package/oonf-git/template
SECTION:=net
CATEGORY:=Network
MAINTAINER:=Henning Rogge <hrogge@gmail.com>
SUBMENU:=OLSR.org network framework
URL:=http://www.olsr.org/
MENU:=1
endef
define Package/oonf-olsrd2
$(call Package/oonf-git/template)
TITLE:= Build Olsrd V2 Routing Agent
DEPENDS:=+librt +libnl-tiny +libuci +oonf-init-scripts
VERSION:=$(PKG_VERSION)
endef
define Package/oonf-olsrd2/config
source "$(SOURCE)/Config.in"
endef
Build/Compile=$(call Build/Compile/Default,olsrd2_static)
Build/Install=
define Build/Install
$(INSTALL_BIN) -D $(PKG_BUILD_DIR)/$(MAKE_PATH)/olsrd2_static $(PKG_INSTALL_DIR)/usr/sbin/olsrd2;
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -I${STAGING_DIR}/usr/include/libnl-tiny
define Package/oonf-olsrd2/install
$(INSTALL_BIN) -D $(PKG_BUILD_DIR)/olsrd2_static $(1)/usr/sbin/olsrd2
$(INSTALL_BIN) -D ./files/olsrd2.init $(1)/etc/init.d/olsrd2
$(INSTALL_BIN) -D ./files/olsrd2.hotplug $(1)/etc/hotplug.d/iface/50-olsrd2
$(INSTALL_DATA) -D ./files/olsrd2.uci $(1)/etc/config/olsrd2
endef
define Package/oonf-olsrd2/conffiles
/etc/config/olsrd2
endef
$(eval $(call BuildPackage,oonf-olsrd2))

View file

@ -0,0 +1,5 @@
#!/bin/sh
DAEMON='olsrd2'
. /lib/functions/oonf_hotplug.sh

6
oonf-olsrd2/files/olsrd2.init Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh /etc/rc.common
START=82
DAEMON='olsrd2'
. /lib/functions/oonf_init.sh

View file

@ -0,0 +1,40 @@
config global
option 'failfast' 'no'
option 'pidfile' '/var/run/olsrd2.pid'
option 'lockfile' '/var/lock/olsrd2'
config log
option 'syslog' 'true'
option 'stderr' 'true'
# option 'file' '/var/log/olsrd2.log'
# option 'info' 'all'
# option 'debug' 'all'
config telnet
# option 'port' '2009'
config olsrv2
# list 'lan' '::/0'
# list 'lan' '0.0.0.0/0'
config interface
option 'ifname' 'loopback'
config interface
list 'ifname' 'WIFI'
list 'ifname' 'wlanadhoc'
list 'ifname' 'wlanadhocRADIO1'
config interface
list 'ifname' 'wan'
option 'ignore' '1'
# option 'rx_bitrate' '100M'
# option 'tx_bitrate' '100M'
# option 'signal' '-20'
config interface
list 'ifname' 'lan'
option 'ignore' '1'
# option 'rx_bitrate' '1G'
# option 'tx_bitrate' '1G'
# option 'signal' '-10'