Compare commits
66 commits
Author | SHA1 | Date | |
---|---|---|---|
|
ee12b0330f | ||
|
00ba1ea5fe | ||
|
09735e0a16 | ||
|
fb0203bc53 | ||
|
11a23c28a3 | ||
|
aab1355501 | ||
|
fec97ee9af | ||
|
43cf77fb15 | ||
|
77d934e4ea | ||
|
48f8992987 | ||
|
f9a9197d62 | ||
|
73c3b55495 | ||
|
d962f7d397 | ||
|
35dd7fdf5c | ||
|
8558fac0c2 | ||
|
2831cf1392 | ||
|
77c76f9823 | ||
|
2caae51450 | ||
|
a3f6a24f2e | ||
|
fddd88b1d3 | ||
|
465b4784bc | ||
|
8fb50df995 | ||
|
777fcc18a4 | ||
|
e2e9be7bd3 | ||
|
99f2c955b3 | ||
|
4b0a4bd80b | ||
|
f6523a6ae9 | ||
|
16e4720534 | ||
|
5e24cbc069 | ||
|
7f970ae58d | ||
|
2e704cd29e | ||
|
678ca49420 | ||
|
0656bdac9b | ||
|
3144a9028c | ||
|
530e8c47db | ||
|
0d7353bc70 | ||
|
7b166ede6e | ||
|
a84e564f85 | ||
|
c8f5a485a7 | ||
|
0db0048832 | ||
|
932b4ec738 | ||
|
87d52fc40d | ||
|
00e5c81841 | ||
|
4a5132cc66 | ||
|
212640f11d | ||
|
c8aa5cd271 | ||
|
e0de429982 | ||
|
8e44826ef4 | ||
|
5d4ad63897 | ||
|
f6aa55e00a | ||
|
c08fe48bcd | ||
|
1a999ad02b | ||
|
47f74d0041 | ||
|
d26e5eb197 | ||
|
e30f3394d3 | ||
|
8ff7cde48f | ||
|
06158b911e | ||
|
a7a090d12e | ||
|
bfbcaf87e6 | ||
|
20004f09cb | ||
|
6218a5ac03 | ||
|
9a64273132 | ||
|
1774c10dba | ||
|
11ed2e8613 | ||
|
9d3c311fdd | ||
|
d7616fd1f3 |
27 changed files with 799 additions and 145 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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" \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
11
miniupnpd/patches/103-nat-pmp-fix-writenu16.patch
Normal file
11
miniupnpd/patches/103-nat-pmp-fix-writenu16.patch
Normal 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)
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
67
oonf-dlep-proxy/Makefile
Normal 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))
|
5
oonf-dlep-proxy/files/dlep_proxy.hotplug
Executable file
5
oonf-dlep-proxy/files/dlep_proxy.hotplug
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
DAEMON='dlep_proxy'
|
||||
|
||||
. /lib/functions/oonf_hotplug.sh
|
6
oonf-dlep-proxy/files/dlep_proxy.init
Executable file
6
oonf-dlep-proxy/files/dlep_proxy.init
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=82
|
||||
DAEMON='dlep_proxy'
|
||||
|
||||
. /lib/functions/oonf_init.sh
|
24
oonf-dlep-proxy/files/dlep_proxy.uci
Normal file
24
oonf-dlep-proxy/files/dlep_proxy.uci
Normal 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
67
oonf-dlep-radio/Makefile
Normal 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))
|
5
oonf-dlep-radio/files/dlep_radio.hotplug
Executable file
5
oonf-dlep-radio/files/dlep_radio.hotplug
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
DAEMON='dlep_radio'
|
||||
|
||||
. /lib/functions/oonf_hotplug.sh
|
6
oonf-dlep-radio/files/dlep_radio.init
Executable file
6
oonf-dlep-radio/files/dlep_radio.init
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=82
|
||||
DAEMON='dlep_radio'
|
||||
|
||||
. /lib/functions/oonf_init.sh
|
24
oonf-dlep-radio/files/dlep_radio.uci
Normal file
24
oonf-dlep-radio/files/dlep_radio.uci
Normal 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'
|
36
oonf-init-scripts/Makefile
Normal file
36
oonf-init-scripts/Makefile
Normal 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))
|
10
oonf-init-scripts/files/oonf_hotplug.sh
Executable file
10
oonf-init-scripts/files/oonf_hotplug.sh
Executable 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
|
120
oonf-init-scripts/files/oonf_init.sh
Executable file
120
oonf-init-scripts/files/oonf_init.sh
Executable 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
47
oonf-olsrd2/Config.in
Normal 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
87
oonf-olsrd2/Makefile
Normal 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))
|
5
oonf-olsrd2/files/olsrd2.hotplug
Executable file
5
oonf-olsrd2/files/olsrd2.hotplug
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
DAEMON='olsrd2'
|
||||
|
||||
. /lib/functions/oonf_hotplug.sh
|
6
oonf-olsrd2/files/olsrd2.init
Executable file
6
oonf-olsrd2/files/olsrd2.init
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=82
|
||||
DAEMON='olsrd2'
|
||||
|
||||
. /lib/functions/oonf_init.sh
|
40
oonf-olsrd2/files/olsrd2.uci
Normal file
40
oonf-olsrd2/files/olsrd2.uci
Normal 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'
|
Loading…
Reference in a new issue