This commit is contained in:
Mattias Walström
2026-06-03 12:56:23 +02:00
parent 49804303ca
commit 1af1cedce9
5 changed files with 3 additions and 48 deletions
@@ -1,9 +1,3 @@
# This service is required since it applies the mesh settings, this must be done
# AFTER the mesh has joined
service name:wpa_cli :%i pid:/run/wpa_cli-%i.pid \
[2345] wpa_cli -P /run/wpa_cli-%i.pid -i %i -a /usr/libexec/mesh-action.sh -r \
-- Wi-Fi Mesh Settings @%i
service name:wpa_supplicant :%i <!pid/wpa_cli:%i> \
service name:wpa_supplicant :%i \
[2345] wpa_supplicant -s -i %i -c /etc/wpa_supplicant-%i.conf -P/var/run/wpa_supplicant-%i.pid \
-- Wi-Fi Mesh @%i
-1
View File
@@ -73,7 +73,6 @@ define FEATURE_WIFI_INSTALL_IN_ROMFS
cp $(FEATURE_WIFI_PKGDIR)/mt7915e.conf $(TARGET_DIR)/etc/modprobe.d/mt7915e.conf
cp $(FEATURE_WIFI_PKGDIR)/60-rename-wifi-phy.rules $(TARGET_DIR)/etc/udev/rules.d/60-rename-wifi-phy.rules
cp $(FEATURE_WIFI_PKGDIR)/70-remove-virtual-wifi-interfaces.rules $(TARGET_DIR)/etc/udev/rules.d/70-remove-virtual-wifi-interfaces.rules
$(INSTALL) -m 0755 $(FEATURE_WIFI_PKGDIR)/mesh-action.sh $(TARGET_DIR)/usr/libexec/mesh-action.sh
endef
FEATURE_WIFI_POST_INSTALL_TARGET_HOOKS += FEATURE_WIFI_INSTALL_IN_ROMFS
-9
View File
@@ -1,9 +0,0 @@
#!/bin/sh
IFACE="$1"
EVENT="$2"
case "$EVENT" in
MESH-GROUP-STARTED*)
[ -f "/run/mesh-params-${IFACE}.conf" ] && . "/run/mesh-params-${IFACE}.conf"
;;
esac
+2 -18
View File
@@ -16,7 +16,6 @@
#include "base64.h"
#define WPA_SUPPLICANT_CONF "/etc/wpa_supplicant-%s.conf"
#define MESH_PARAMS_CONF "/run/mesh-params-%s.conf"
int wifi_validate_secret(sr_session_ctx_t *session, struct lyd_node *cif)
@@ -303,12 +302,12 @@ int wifi_gen_mesh(struct lyd_node *cif)
const char *ifname, *mesh_id, *secret_name, *radio;
struct lyd_node *mesh, *security, *secret_node, *radio_node, *wifi;
const char *country, *band, *width;
FILE *wpa_supplicant = NULL, *params;
FILE *wpa_supplicant = NULL;
unsigned char *secret = NULL;
int rc = SR_ERR_OK;
int channel, freq;
bool forwarding, gate;
mode_t oldmask;
bool forwarding;
ifname = lydx_get_cattr(cif, "name");
wifi = lydx_get_child(cif, "wifi");
@@ -416,19 +415,6 @@ int wifi_gen_mesh(struct lyd_node *cif)
fprintf(wpa_supplicant, "}\n");
/* Generate mesh params file, sourced by mesh-action.sh on MESH-GROUP-STARTED */
gate = lydx_is_enabled(mesh, "gate-announcements");
if (gate) {
params = fopenf("w", MESH_PARAMS_CONF, ifname);
if (params) {
fprintf(params, "iw dev %s set mesh_param mesh_gate_announcements 1\n", ifname);
fclose(params);
}
} else {
erasef(MESH_PARAMS_CONF, ifname);
}
out:
free(secret);
if (wpa_supplicant)
@@ -538,7 +524,6 @@ int wifi_add_iface(struct lyd_node *cif, struct dagger *net)
rc = SR_ERR_INVAL_ARG;
goto out;
}
out:
fclose(iw);
return rc;
@@ -572,7 +557,6 @@ int wifi_del_iface(struct lyd_node *dif, struct dagger *net)
if (mode == wifi_mesh) {
erasef(WPA_SUPPLICANT_CONF, ifname);
erasef(MESH_PARAMS_CONF, ifname);
fprintf(iw, "initctl -bfq disable mesh@%s\n", ifname);
} else if (mode != wifi_ap) {
erasef(WPA_SUPPLICANT_CONF, ifname);
-13
View File
@@ -699,19 +699,6 @@ submodule infix-if-wifi {
When false, only locally destined traffic is received.";
}
leaf gate-announcements {
type boolean;
default false;
description
"Enable mesh gate announcements (GANN frames).
When true, this node advertises itself as a mesh gate
(i.e., it has external network connectivity). Other mesh
nodes proactively maintain a path to this node.
Typically enabled on nodes with a wired uplink.";
}
container security {
description
"Mesh security configuration.