gluon-core: upgrade/110-network: fix formatting

This commit is contained in:
Matthias Schiffer 2018-02-03 03:02:20 +01:00
parent 6137169104
commit 09c2e60cd4
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -5,69 +5,58 @@ local sysctl = require 'gluon.sysctl'
local sysconfig = require 'gluon.sysconfig'
uci:section('network', 'interface', 'wan',
{
uci:section('network', 'interface', 'wan', {
ifname = sysconfig.wan_ifname,
type = 'bridge',
igmp_snooping = true,
multicast_querier = false,
peerdns = false,
auto = true,
}
)
})
if not uci:get('network', 'wan', 'proto') then
uci:set('network', 'wan', 'proto', 'dhcp')
end
uci:section('network', 'interface', 'wan6',
{
uci:section('network', 'interface', 'wan6', {
ifname = 'br-wan',
peerdns = false,
ip6table = 1,
sourcefilter = false,
}
)
})
if not uci:get('network', 'wan6', 'proto') then
uci:set('network', 'wan6', 'proto', 'dhcpv6')
end
uci:section('network', 'rule6', 'wan6_lookup',
{
uci:section('network', 'rule6', 'wan6_lookup', {
mark = '0x01/0x01',
lookup = 1,
}
)
})
uci:section('network', 'route6', 'wan6_unreachable',
{
uci:section('network', 'route6', 'wan6_unreachable', {
type = 'unreachable',
interface = 'loopback',
target = '::/0',
gateway = '::',
table = 1,
metric = 65535,
}
)
})
uci:save('network')
uci:section('firewall', 'rule', 'wan_igmp',
{
uci:section('firewall', 'rule', 'wan_igmp', {
name = 'Allow-IGMP',
src = 'wan',
proto = 'igmp',
family = 'ipv4',
target = 'ACCEPT',
}
)
})
uci:section('firewall', 'rule', 'wan_mld',
{
uci:section('firewall', 'rule', 'wan_mld', {
name = 'Allow-MLD',
src = 'wan',
proto = 'icmp',
@ -75,8 +64,7 @@ uci:section('firewall', 'rule', 'wan_mld',
icmp_type = { '130/0', '131/0', '132/0', '143/0', },
family = 'ipv6',
target = 'ACCEPT',
}
)
})
uci:save('firewall')