travelmate: an SSID with a leading or trailing space never connects

Open Beginner friendly
#31,321 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
shell
Domain
networking

Research direction

Start with travelmate-functions.sh in the openwrt-25.12 package source and trace how f_scan cleans scan SSIDs; the issue reports the equivalent logic in scan.uc for 3.x. Preserve leading and trailing spaces while removing control characters, then verify that a profile containing the exact broadcast SSID is selected and connects.

Written by the indexing model from the issue text.

Description

Package Name

travelmate

Maintainer

@dibdot

OpenWrt Version

25.12.6 (travelmate 2.4.9-r6). The same code path is in SNAPSHOT / master (3.0.0-r1 and 3.1.0, read from source).

OpenWrt Target/Subtarget

Target-independent (scan parsing in travelmate itself)

Steps to Reproduce
  1. Be in range of an AP whose SSID ends (or starts) with a space, e.g. Example (last byte 0x20). iwinfo / ubus call iwinfo scan reports the SSID with the space.
  2. Add the uplink with the SSID exactly as broadcast, including the space, in travelmate and in its wireless STA section.
  3. Watch the travelmate log during the next cycles.
Actual Behaviour

The uplink is never selected. f_scan cleans each scan SSID and also trims leading and trailing spaces (2.4.9, travelmate-functions.sh in openwrt-25.12):

gsub(/[[:cntrl:]]/, "");
sub(/^[ \t]+/, "");
sub(/[ \t]+$/, "");
print

The scanned Example then never equals the configured Example .

Removing the space from the profile does not help. Travelmate then matches the network in its scan, but wpa_supplicant looks for Example and does not find it, because the AP broadcasts Example . The retries run out and the uplink gets disabled.

3.x has the same behaviour:

  • scan.uc clean_ssid() ends with return trim(out, ' '); (line 21 at 51a58a0d7f).
  • select.uc compares e.raw == sessid (line 205).
Expected Behaviour

Scan SSIDs are kept as broadcast, apart from removing control characters, so a profile with the exact SSID matches. Spaces are valid SSID octets.

Field check on 2.4.9-r6 (2026-11-15): with the two sub(...) lines removed from f_scan and the space kept in the profile, the router associated and its connectivity check passed. The control-character cleanup can stay. In 3.x the equivalent would be dropping the trim(out, ' ') in clean_ssid().

This is a different case from #8357 (2019), where a comma, not the leading space, was the cause.

Confirmation Checklist
  • The package is maintained in this repository.
  • I understand that issues related to the base OpenWrt repository or LuCI repository will be closed.
  • I am reporting an issue for OpenWrt, not an unsupported fork.
Dominant language
Makefile
Stars
4.7k
Forks
4k
Avg merge
2d 5h
Merged PRs (30d)
249

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openwrt/packages

All issues in openwrt/packages

Similar issues

More Networking issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.