gluon-mesh-babel: use babel 1.9.0 feature to set pref-src on installed routes
This commit is contained in:
parent
abf46c5f42
commit
2389679380
@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/lua
|
#!/usr/bin/lua
|
||||||
|
|
||||||
local site = require 'gluon.site'
|
local site = require 'gluon.site'
|
||||||
|
local uci = require('simple-uci').cursor()
|
||||||
|
local nodeip = uci:get('network', 'loopback', 'ip6addr'):match('^[^/]+')
|
||||||
local babelconf='/etc/gluon-babeld.conf'
|
local babelconf='/etc/gluon-babeld.conf'
|
||||||
|
|
||||||
local file = io.open(babelconf, "w")
|
local file = io.open(babelconf, "w")
|
||||||
@ -15,7 +17,7 @@ file:write("redistribute ip " .. site.prefix6() .. " eq 128 allow\n")
|
|||||||
file:write("redistribute ip " .. site.node_client_prefix6() .. " eq 128 allow\n")
|
file:write("redistribute ip " .. site.node_client_prefix6() .. " eq 128 allow\n")
|
||||||
file:write("redistribute ip " .. site.node_prefix6() .. " eq 128 allow\n")
|
file:write("redistribute ip " .. site.node_prefix6() .. " eq 128 allow\n")
|
||||||
file:write("redistribute ip 2000::/3 allow\n")
|
file:write("redistribute ip 2000::/3 allow\n")
|
||||||
|
|
||||||
file:write("redistribute local if br-wan deny\n")
|
file:write("redistribute local if br-wan deny\n")
|
||||||
file:write("redistribute local ip 0.0.0.0/0 deny\n")
|
file:write("redistribute local ip 0.0.0.0/0 deny\n")
|
||||||
|
file:write("install pref-src " .. nodeip .."\n")
|
||||||
file:close()
|
file:close()
|
||||||
|
Loading…
Reference in New Issue
Block a user