The site.node_client_prefix6() is only used internally by the l3roamd protocol. Therefore it is unnecessary to expose it to an administrator. Instead, if node_client_prefix6 is unspecified in the site, generate an IPv6 Unique Local Address prefix from the site domain_seed. This updates the site documentation as well and marks this setting as both optional and deprecated. Note: If you had the node_client_prefix6 specified before and want to use the new autogeneration from the domain_seed instead then this will break compatibility and will need a gluon-scheduled-domain switch. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
		
			
				
	
	
		
			25 lines
		
	
	
		
			995 B
		
	
	
	
		
			Lua
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			995 B
		
	
	
	
		
			Lua
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/lua
 | |
| 
 | |
| local site = require 'gluon.site'
 | |
| local l3 = require 'gluon.l3'
 | |
| local uci = require('simple-uci').cursor()
 | |
| local nodeip = uci:get('network', 'loopback', 'ip6addr'):match('^[^/]+')
 | |
| local babelconf='/etc/gluon-babeld.conf'
 | |
| 
 | |
| local file = io.open(babelconf, "w")
 | |
| file:write("ipv6-subtrees true\n")
 | |
| file:write("reflect-kernel-metric true\n")
 | |
| file:write("export-table 254\n")
 | |
| file:write("import-table 254\n")
 | |
| 
 | |
| file:write("out ip " .. site.next_node.ip6() .. "/128 deny\n")
 | |
| file:write("redistribute ip " .. site.next_node.ip6() .. "/128 deny\n")
 | |
| file:write("redistribute ip " .. site.prefix6() .. " eq 128  allow\n")
 | |
| file:write("redistribute ip " .. l3.node_client_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 local if br-wan deny\n")
 | |
| file:write("redistribute local ip 0.0.0.0/0 deny\n")
 | |
| file:write("install pref-src " .. nodeip .."\n")
 | |
| file:close()
 |