diff --git a/package/gluon-client-bridge/Makefile b/package/gluon-client-bridge/Makefile index 7f967ab4964cd8013f4bdbffce0513d306f743f2..b88b0291482aa7f60528d5c158c98b7e0d9a4890 100644 --- a/package/gluon-client-bridge/Makefile +++ b/package/gluon-client-bridge/Makefile @@ -12,7 +12,7 @@ define Package/gluon-client-bridge SECTION:=gluon CATEGORY:=Gluon TITLE:=Provides a bridge and a wireless interface for clients to connect to - DEPENDS:=+gluon-core +kmod-macvlan + DEPENDS:=+gluon-core +kmod-veth endef define Build/Prepare diff --git a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network index c3fefdf8518e0c07c03f521cbaf5c8387d140c2f..ca29e9ac5f95065881b3705a114e514472cad895 100755 --- a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network +++ b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network @@ -23,6 +23,9 @@ if sysconfig.lan_ifname and not ifname and not uci:get_bool('network', 'mesh_lan end end +util.add_to_set(interfaces, 'local-port') + + uci:delete('network', 'client') uci:section('network', 'interface', 'client', { type = 'bridge', diff --git a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/310-gluon-client-bridge-local-node b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/310-gluon-client-bridge-local-node index efde1c3d43662875f285b83379a42555f41ac311..dcdc68f6f3784b697e46eef0d28ed0788777c4e7 100755 --- a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/310-gluon-client-bridge-local-node +++ b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/310-gluon-client-bridge-local-node @@ -8,10 +8,11 @@ local uci = require('simple-uci').cursor() uci:delete('network', 'local_node_dev') uci:section('network', 'device', 'local_node_dev', { + type = 'veth', name = 'local-node', - ifname = 'br-client', - type = 'macvlan', macaddr = site.next_node.mac, + peer_name = 'local-port', + peer_macaddr = sysconfig.primary_mac, }) diff --git a/package/gluon-ebtables/files/lib/gluon/ebtables/101-dir-rules b/package/gluon-ebtables/files/lib/gluon/ebtables/101-dir-rules index b1cd4e2468be728b23195d423b805a97b651c4fe..74486ae537f9cb78c511a5c128841ee4c53b2427 100644 --- a/package/gluon-ebtables/files/lib/gluon/ebtables/101-dir-rules +++ b/package/gluon-ebtables/files/lib/gluon/ebtables/101-dir-rules @@ -1,2 +1,7 @@ -rule 'IN_ONLY --logical-in br-client -i ! bat0 -j DROP' -rule 'OUT_ONLY --logical-out br-client -o ! bat0 -j DROP' +rule 'IN_ONLY --logical-in br-client -i bat0 -j RETURN' +rule 'IN_ONLY --logical-in br-client -i local-port -j RETURN' +rule 'IN_ONLY --logical-in br-client -j DROP' + +rule 'OUT_ONLY --logical-out br-client -o bat0 -j RETURN' +rule 'OUT_ONLY --logical-out br-client -o local-port -j RETURN' +rule 'OUT_ONLY --logical-out br-client -j DROP'