From 9269812f556ffea9d2cd749449361bd533f938ff Mon Sep 17 00:00:00 2001 From: Jan Luebbe <jlu@pengutronix.de> Date: Sat, 15 Sep 2018 21:37:11 +0200 Subject: [PATCH] gluon-core: configure unreachable routes --- .../luasrc/lib/gluon/upgrade/110-network | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/110-network b/package/gluon-core/luasrc/lib/gluon/upgrade/110-network index 79c50d279..4f31fd7e5 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/110-network +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/110-network @@ -18,6 +18,21 @@ if not uci:get('network', 'wan', 'proto') then end +uci:section('network', 'rule', 'wan_lookup', { + mark = '0x01/0x01', + lookup = 1, +}) + +uci:section('network', 'route', 'wan_unreachable', { + type = 'unreachable', + interface = 'loopback', + target = '0.0.0.0', + netmask = '0', + table = 1, + metric = 65535, +}) + + uci:section('network', 'interface', 'wan6', { ifname = 'br-wan', peerdns = false, @@ -45,6 +60,24 @@ uci:section('network', 'route6', 'wan6_unreachable', { metric = 65535, }) + +uci:section('network', 'route', 'client_unreachable', { + type = 'unreachable', + interface = 'loopback', + target = '0.0.0.0', + netmask = '0', + metric = 65535, +}) + +uci:section('network', 'route6', 'client6_unreachable', { + type = 'unreachable', + interface = 'loopback', + target = '::/0', + gateway = '::', + metric = 65535, +}) + + uci:save('network') -- GitLab