Commit 3d94505c authored by Gio's avatar Gio

lime-proto-{bgp,bmx}: added route sharing from bird to bmx6

parent 7a3ae47b
......@@ -33,13 +33,32 @@ protocol kernel {
]]
for _,proto in pairs(config.get("network", "protocols")) do
if proto == "lan" then
if proto:match("^lan") then
base_template = base_template .. [[
protocol direct {
interface "br-lan";
}
]]
break
elseif proto:match("^bmx") then
base_template = base_template .. [[
table tobmx;
protocol pipe {
table master;
peer table tobmx;
import all;
export all;
}
protocol kernel
{
scan time 20;
table tobmx;
kernel table 200;
import all;
export all;
}
]]
end
end
......@@ -66,7 +85,6 @@ protocol bgp {
end
config.foreach("bgp_peer", apply_peer_template)
fs.writefile("/etc/bird4.conf", bird4_config)
fs.writefile("/etc/bird6.conf", bird6_config)
end
......
......@@ -88,6 +88,15 @@ function bmx6.configure(args)
end
end
for _,proto in pairs(config.get("network", "protocols")) do
if proto:match("^bgp") then
uci:set("bmx6", "fromBird", "redistTable")
uci:set("bmx6", "fromBird", "redistTable", "fromBird")
uci:set("bmx6", "fromBird", "table", "200")
uci:set("bmx6", "fromBird", "bandwidth", "100")
end
end
uci:save("bmx6")
......
......@@ -66,6 +66,7 @@
### If you use manual do not specify other protocols, may result in an unpredictable behavior/configuration (likely you loose connection to the node)
#config net eth5
# option linux_name 'eth5' # Should use this because interface name can contains dots like eth0.2 while uci section names cannot
# list protocols 'manual'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment