320-gluon-mesh-batman-adv-core-client-bridge 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/lua
  2. local sysconfig = require 'gluon.sysconfig'
  3. local sysctl = require 'gluon.sysctl'
  4. local uci = require('simple-uci').cursor()
  5. uci:section('network', 'interface', 'client',
  6. {
  7. robustness = 3,
  8. query_interval = 2000,
  9. query_response_interval = 500,
  10. }
  11. )
  12. uci:delete('network', 'client', 'igmp_snooping')
  13. uci:delete('network', 'client_lan')
  14. if sysconfig.lan_ifname then
  15. uci:section('network', 'interface', 'client_lan',
  16. {
  17. unicast_flood = false,
  18. }
  19. )
  20. uci:set('network', 'client_lan', 'ifname', sysconfig.lan_ifname)
  21. end
  22. uci:save('network')
  23. uci:delete('firewall', 'client')
  24. uci:section('firewall', 'zone', 'client',
  25. {
  26. name = 'client',
  27. network = {'client'},
  28. input = 'ACCEPT',
  29. output = 'ACCEPT',
  30. forward = 'REJECT',
  31. }
  32. )
  33. uci:delete('firewall', 'client_dns')
  34. uci:save('firewall')
  35. sysctl.set('net.ipv6.conf.br-client.forwarding')