Skip to content
Snippets Groups Projects
Select Git revision
  • fcd5f183ee998a59cf05c8ebbb73f4abd509d217
  • v2018.2.x default
  • experimental
  • master
  • v2021.1.2-ffs
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • v2020.2.3-ffs
  • nrbffs/fastd-remove-delay
  • v2020.2.2-ffs
  • v2020.2.1-ffs
  • v2020.2-ffs
  • v2020.2.x
  • v2020.1.3-ffs
  • v2020.1.1-ffs
  • v2020.1-ffs
  • v2019.1.2-ffs
  • v2019.1.1-ffs
  • nrb/test-radv-filter
  • v2019.1-ffs
  • nrbffs/netgear-ex6120
  • v2021.1.2-ffs0.2
  • v2021.1.2-ffs0.1
  • v2021.1.1-ffs0.4
  • v2021.1.1-ffs0.3
  • v2021.1.1-ffs0.2
  • v2021.1.1-ffs0.1
  • v2021.1-ffs0.1
  • v2020.2.3-ffs0.3
  • v2020.2.3-ffs0.2
  • v2020.2.3-ffs0.1
  • v2020.2.2-ffs0.1
  • v2020.2.1-ffs0.1
  • v2020.2-ffs0.1
  • v2020.2
  • v2020.2.x-ffs0.1
  • v2020.1.3-ffs0.1
  • v2020.1.1-ffs0.1
  • v2020.1-ffs0.1
  • v2019.1.2-ffs0.1
  • v2019.1.1-ffs0.1
42 results

0087-ar71xx-add-support-for-GL.iNet-GL-AR750.patch

Blame
  • Forked from firmware / FFS Gluon
    Source project has a limited visibility.
    400-next-node 1.12 KiB
    #!/usr/bin/lua
    
    local site = require 'gluon.site_config'
    local uci = require 'luci.model.uci'
    local ip = require 'luci.ip'
    
    local c = uci.cursor()
    
    
    c:delete('network', 'local_node_dev')
    c:section('network', 'device', 'local_node_dev',
    	  {
    		  name = 'local-node',
    		  ifname = 'br-client',
    		  type = 'macvlan',
    		  macaddr = site.next_node.mac,
    	  }
    )
    
    local ip4, netmask
    
    if site.next_node.ip4 then
    	ip4 = site.next_node.ip4
    	netmask = ip.IPv4(site.prefix4):mask():string()
    end
    
    c:delete('network', 'local_node')
    c:section('network', 'interface', 'local_node',
    	  {
    		  ifname = 'local-node',
    		  proto = 'static',
    		  ipaddr = ip4,
    		  netmask = netmask,
    		  ip6addr = site.next_node.ip6 .. '/128',
    	  }
    )
    
    c:delete('network', 'local_node_route6')
    c:section('network', 'route6', 'local_node_route6',
    	  {
    		  interface = 'client',
    		  target = site.prefix6,
    		  gateway = '::',
    	  }
    )
    
    c:save('network')
    
    c:delete('firewall', 'local_node')
    c:section('firewall', 'zone', 'local_node',
    	  {
    		  name = 'local_node',
    		  network = {'local_node'},
    		  input = 'ACCEPT',
    		  output = 'ACCEPT',
    		  forward = 'REJECT',
    	  }
    )
    c:save('firewall')