Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b8d2602 authored by Alexei Avshalom Lazar's avatar Alexei Avshalom Lazar
Browse files

Non-transparent FST support by fst_manager logic

Adjusted the FST Manager's logic to support non-transparent FST
using the old (transparent) MUX interface and implementation.

Each peer has a list of connections (interface-MAC pairs), and a
peer can now be identified by any one of those pairs, instead of
by a single MAC address as before.
On new connection establishment, MB IEs of already established
connections are scanned in order to identify the peer to which that
new connection is relevant.

Change-Id: Iecd6f2f401a38671c6226c069872af44ccadfaff
parent 569c2aed
Loading
Loading
Loading
Loading
+1437 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −1
Original line number Diff line number Diff line
@@ -230,7 +230,8 @@ static int do_bonding_operations(Boolean enslave)
	for (i = 0; i < gcnt; i++) {
		muxtype = fst_cfgmgr_get_mux_type(groups[i].id,
			buf, sizeof(buf)-1);
		if (muxtype && os_strcmp(buf, "bonding")) {
		if (muxtype && os_strncmp(buf, "bonding", sizeof(buf)-1) &&
				os_strncmp(buf, "bonding_l2da", sizeof(buf)-1)) {
			fst_mgr_printf(MSG_DEBUG,
				"Group %s mux type %s not supported, skipping",
				groups[i].id, buf);
+6 −4
Original line number Diff line number Diff line
@@ -491,7 +491,8 @@ static int parse_peer_mbies(char *buf, void *data)
	return os_strlen(buf);
}

int fst_get_peer_mbies(struct fst_iface_info *iface, uint8_t *peer, char **mbies)
int fst_get_peer_mbies(struct fst_iface_info *iface, const uint8_t *peer,
		       char **mbies)
{
	return do_command(parse_peer_mbies, mbies, FST_CMD_GET_PEER_MBIES " %s "
			  MACSTR, iface->name, MAC2STR(peer));
@@ -1018,12 +1019,13 @@ int fst_disconnect_peer(const char *ifname, const u8 *peer_addr)
{
	int ret;

	fst_mgr_printf(MSG_INFO, "ifname=%s, peer=" MACSTR, ifname, MAC2STR(peer_addr));

	if (fst_is_supplicant()) {
		fst_mgr_printf(MSG_INFO, "ifname=%s", ifname);
		ret = do_simple_command("IFNAME=%s DISCONNECT", ifname);
	}
	else {
	else if (peer_addr) {
		fst_mgr_printf(MSG_INFO, "ifname=%s, peer=" MACSTR, ifname,
			       MAC2STR(peer_addr));
		ret = do_simple_command("IFNAME=%s DISASSOCIATE " MACSTR, ifname, MAC2STR(peer_addr));
	}

+2 −1
Original line number Diff line number Diff line
@@ -96,7 +96,8 @@ int fst_get_iface_peers(const struct fst_group_info *group,
 *	if not NULL. The array should be freed by caller.
 * Returns: Number of allocated bytes if success or negative error code
 */
int fst_get_peer_mbies(struct fst_iface_info *iface, uint8_t *peer, char **mbies);
int fst_get_peer_mbies(struct fst_iface_info *iface, const uint8_t *peer,
		       char **mbies);

/**
 * fst_get_group_ifaces - get interfaces for the provided group
+1 −1
Original line number Diff line number Diff line
@@ -798,7 +798,7 @@ out:
}

int fst_get_peer_mbies(const struct fst_group_info *group,
	struct fst_iface_info *iface, uint8_t *peer, char **mbies)
	struct fst_iface_info *iface, const uint8_t *peer, char **mbies)
{
	int           res = -EINVAL;
	GVariant     *value;
Loading