diff --git a/wireless/wifictld/Makefile b/wireless/wifictld/Makefile index 28c5c61..4eaf498 100644 --- a/wireless/wifictld/Makefile +++ b/wireless/wifictld/Makefile @@ -55,6 +55,7 @@ define Package/wifictld/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/wifictld $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/init.d/ $(INSTALL_BIN) ./files/etc/init.d/wifictld $(1)/etc/init.d/ + $(CP) ./luasrc/. $(1)/ endef Package/wifictld-mini/install = $(Package/wifictld/install) diff --git a/wireless/wifictld/files/etc/init.d/wifictld b/wireless/wifictld/files/etc/init.d/wifictld index 74c202f..aacf07d 100644 --- a/wireless/wifictld/files/etc/init.d/wifictld +++ b/wireless/wifictld/files/etc/init.d/wifictld @@ -13,7 +13,7 @@ start_service () { procd_set_param stdout 1 procd_set_param stderr 1 procd_set_param respawn ${respawn_threshold:-3660} ${respawn_timeout:-5} ${respawn_retry:-0} - procd_set_param command "$PROG" --if br-wan --mif br-wan + procd_set_param command "$PROG" --if mmfd0 --addr $(uci get network.loopback.ip6addr | sed 's/\/128//') --maddr ff05::31f1 --port 1000 --clean-authed=1 procd_set_param watch network.wireless procd_close_instance } diff --git a/wireless/wifictld/luasrc/lib/gluon/ebtables/350-mcast-wifictld b/wireless/wifictld/luasrc/lib/gluon/ebtables/350-mcast-wifictld new file mode 100755 index 0000000..326326e --- /dev/null +++ b/wireless/wifictld/luasrc/lib/gluon/ebtables/350-mcast-wifictld @@ -0,0 +1 @@ +rule 'MULTICAST_OUT -p IPv6 --ip6-protocol udp --ip6-destination ff05::31f1 --ip6-destination-port 1000 -j RETURN' diff --git a/wireless/wifictld/luasrc/lib/gluon/upgrade/400-wifictld-firewall b/wireless/wifictld/luasrc/lib/gluon/upgrade/400-wifictld-firewall new file mode 100755 index 0000000..7aa5323 --- /dev/null +++ b/wireless/wifictld/luasrc/lib/gluon/upgrade/400-wifictld-firewall @@ -0,0 +1,25 @@ +#!/usr/bin/lua + +local uci = require('simple-uci').cursor() +local site = require('gluon.site') + + +uci:section('firewall', 'rule', 'mesh_wifictld_ll', { + name = 'mesh_wifictld_ll', + src = 'mesh', + src_ip = 'fe80::/64', + dest_port = '1000', + proto = 'udp', + target = 'ACCEPT', +}) + +uci:section('firewall', 'rule', 'mesh_wifictld_siteprefix', { + name = 'mesh_wifictld_siteprefix', + src = 'mesh', + src_ip = site.node_prefix6(), + dest_port = '1000', + proto = 'udp', + target = 'ACCEPT', +}) + +uci:save('firewall')