Skip to content
Snippets Groups Projects
Commit c14b4c0b authored by lemoer's avatar lemoer Committed by Leonardo Mörlein
Browse files

gluon-core: add vxlan option to gluon_wired proto

Before this commit the decision whether a vxlan layer will be
introduced between the lower interface before the interface is
added to batman was inside the proto. Now the decision is moved
to the user of the proto.
parent 39c1f672
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ init_proto "$@"
proto_gluon_wired_init_config() {
proto_config_add_boolean transitive
proto_config_add_int index
proto_config_add_boolean vxlan
}
xor2() {
......@@ -28,15 +29,16 @@ proto_gluon_wired_setup() {
local meshif="$config"
local vxlan="$(lua -e 'print(require("gluon.site").mesh.vxlan(true))')"
local transitive index vxlan
json_get_vars transitive index vxlan
local transitive index
json_get_vars transitive index
# default args
[ -z "$vxlan" ] && vxlan=1
proto_init_update "$ifname" 1
proto_send_update "$config"
if [ "$vxlan" = 'true' ]; then
if [ "$vxlan" -eq 1 ]; then
meshif="vx_$config"
json_init
......
......@@ -7,6 +7,7 @@ uci:section('network', 'interface', 'mesh_wan', {
ifname = 'br-wan',
proto = 'gluon_wired',
index = 0,
vxlan = site.mesh.vxlan(true),
})
local enable = site.mesh_on_wan(false)
......
......@@ -15,6 +15,7 @@ uci:section('network', 'interface', 'mesh_lan', {
igmp_snooping = false,
proto = 'gluon_wired',
index = 4,
vxlan = site.mesh.vxlan(true),
})
if sysconfig.lan_ifname:match(' ') then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment