gluon-next-node: fix IPv4 next node feature

This commit is contained in:
Lars Bußmann 2015-03-18 15:58:21 +01:00
parent b58ab9abb9
commit 9e267f30bf
2 changed files with 5 additions and 12 deletions

View File

@ -1,6 +1,9 @@
local site = require 'gluon.site_config' local site = require 'gluon.site_config'
local next_node = site.next_node local next_node = site.next_node
rule('FORWARD --logical-in br-client -p ARP --arp-ip-src ' .. next_node.ip4 .. ' -j DROP')
rule('FORWARD --logical-in br-client -p ARP --arp-ip-dst ' .. next_node.ip4 .. ' -j DROP')
rule('FORWARD --logical-out br-client -o bat0 -d ' .. next_node.mac .. ' -j DROP') rule('FORWARD --logical-out br-client -o bat0 -d ' .. next_node.mac .. ' -j DROP')
rule('OUTPUT --logical-out br-client -o bat0 -d ' .. next_node.mac .. ' -j DROP') rule('OUTPUT --logical-out br-client -o bat0 -d ' .. next_node.mac .. ' -j DROP')
rule('FORWARD --logical-out br-client -o bat0 -s ' .. next_node.mac .. ' -j DROP') rule('FORWARD --logical-out br-client -o bat0 -s ' .. next_node.mac .. ' -j DROP')

View File

@ -17,25 +17,15 @@ c:section('network', 'device', 'local_node_dev',
} }
) )
local prefix4 = ip.IPv4(site.prefix4)
c:delete('network', 'local_node') c:delete('network', 'local_node')
c:section('network', 'interface', 'local_node', c:section('network', 'interface', 'local_node',
{ {
ifname = 'local-node', ifname = 'local-node',
proto = 'static', proto = 'static',
ipaddr = site.next_node.ip4, ipaddr = site.next_node.ip4,
netmask = '255.255.255.255',
ip6addr = site.next_node.ip6 .. '/128',
}
)
local prefix4 = ip.IPv4(site.prefix4)
c:delete('network', 'local_node_route4')
c:section('network', 'route', 'local_node_route4',
{
interface = 'client',
target = prefix4:network():string(),
netmask = prefix4:mask():string(), netmask = prefix4:mask():string(),
gateway = '0.0.0.0', ip6addr = site.next_node.ip6 .. '/128',
} }
) )