From 9e267f30bf9ed7b3da26e9290d58018b92cb3431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Bu=C3=9Fmann?= Date: Wed, 18 Mar 2015 15:58:21 +0100 Subject: [PATCH] gluon-next-node: fix IPv4 next node feature --- .../files/lib/gluon/ebtables/250-next-node | 3 +++ .../files/lib/gluon/upgrade/400-next-node | 14 ++------------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/package/gluon-next-node/files/lib/gluon/ebtables/250-next-node b/package/gluon-next-node/files/lib/gluon/ebtables/250-next-node index 6b9588f7..0df7abcc 100644 --- a/package/gluon-next-node/files/lib/gluon/ebtables/250-next-node +++ b/package/gluon-next-node/files/lib/gluon/ebtables/250-next-node @@ -1,6 +1,9 @@ local site = require 'gluon.site_config' 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('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') diff --git a/package/gluon-next-node/files/lib/gluon/upgrade/400-next-node b/package/gluon-next-node/files/lib/gluon/upgrade/400-next-node index 55507fa4..0ff959fe 100755 --- a/package/gluon-next-node/files/lib/gluon/upgrade/400-next-node +++ b/package/gluon-next-node/files/lib/gluon/upgrade/400-next-node @@ -17,25 +17,15 @@ c:section('network', 'device', 'local_node_dev', } ) +local prefix4 = ip.IPv4(site.prefix4) c:delete('network', 'local_node') c:section('network', 'interface', 'local_node', { ifname = 'local-node', proto = 'static', 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(), - gateway = '0.0.0.0', + ip6addr = site.next_node.ip6 .. '/128', } )