gluon-core: upgrade/110-network: fix formatting
This commit is contained in:
parent
6137169104
commit
09c2e60cd4
@ -5,78 +5,66 @@ local sysctl = require 'gluon.sysctl'
|
|||||||
local sysconfig = require 'gluon.sysconfig'
|
local sysconfig = require 'gluon.sysconfig'
|
||||||
|
|
||||||
|
|
||||||
uci:section('network', 'interface', 'wan',
|
uci:section('network', 'interface', 'wan', {
|
||||||
{
|
ifname = sysconfig.wan_ifname,
|
||||||
ifname = sysconfig.wan_ifname,
|
type = 'bridge',
|
||||||
type = 'bridge',
|
igmp_snooping = true,
|
||||||
igmp_snooping = true,
|
multicast_querier = false,
|
||||||
multicast_querier = false,
|
peerdns = false,
|
||||||
peerdns = false,
|
auto = true,
|
||||||
auto = true,
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
if not uci:get('network', 'wan', 'proto') then
|
if not uci:get('network', 'wan', 'proto') then
|
||||||
uci:set('network', 'wan', 'proto', 'dhcp')
|
uci:set('network', 'wan', 'proto', 'dhcp')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
uci:section('network', 'interface', 'wan6',
|
uci:section('network', 'interface', 'wan6', {
|
||||||
{
|
ifname = 'br-wan',
|
||||||
ifname = 'br-wan',
|
peerdns = false,
|
||||||
peerdns = false,
|
ip6table = 1,
|
||||||
ip6table = 1,
|
sourcefilter = false,
|
||||||
sourcefilter = false,
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
if not uci:get('network', 'wan6', 'proto') then
|
if not uci:get('network', 'wan6', 'proto') then
|
||||||
uci:set('network', 'wan6', 'proto', 'dhcpv6')
|
uci:set('network', 'wan6', 'proto', 'dhcpv6')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
uci:section('network', 'rule6', 'wan6_lookup',
|
uci:section('network', 'rule6', 'wan6_lookup', {
|
||||||
{
|
mark = '0x01/0x01',
|
||||||
mark = '0x01/0x01',
|
lookup = 1,
|
||||||
lookup = 1,
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
uci:section('network', 'route6', 'wan6_unreachable',
|
uci:section('network', 'route6', 'wan6_unreachable', {
|
||||||
{
|
type = 'unreachable',
|
||||||
type = 'unreachable',
|
interface = 'loopback',
|
||||||
interface = 'loopback',
|
target = '::/0',
|
||||||
target = '::/0',
|
gateway = '::',
|
||||||
gateway = '::',
|
table = 1,
|
||||||
table = 1,
|
metric = 65535,
|
||||||
metric = 65535,
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
|
|
||||||
|
|
||||||
uci:section('firewall', 'rule', 'wan_igmp',
|
uci:section('firewall', 'rule', 'wan_igmp', {
|
||||||
{
|
name = 'Allow-IGMP',
|
||||||
name = 'Allow-IGMP',
|
src = 'wan',
|
||||||
src = 'wan',
|
proto = 'igmp',
|
||||||
proto = 'igmp',
|
family = 'ipv4',
|
||||||
family = 'ipv4',
|
target = 'ACCEPT',
|
||||||
target = 'ACCEPT',
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
uci:section('firewall', 'rule', 'wan_mld',
|
uci:section('firewall', 'rule', 'wan_mld', {
|
||||||
{
|
name = 'Allow-MLD',
|
||||||
name = 'Allow-MLD',
|
src = 'wan',
|
||||||
src = 'wan',
|
proto = 'icmp',
|
||||||
proto = 'icmp',
|
src_ip = 'fe80::/10',
|
||||||
src_ip = 'fe80::/10',
|
icmp_type = { '130/0', '131/0', '132/0', '143/0', },
|
||||||
icmp_type = { '130/0', '131/0', '132/0', '143/0', },
|
family = 'ipv6',
|
||||||
family = 'ipv6',
|
target = 'ACCEPT',
|
||||||
target = 'ACCEPT',
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
uci:save('firewall')
|
uci:save('firewall')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user