[arch-projects] [netctl] [PATCH] wifi-menu: Support UTF-8 encoded SSIDs (FS#45384)

Jouke Witteveen j.witteveen at gmail.com
Tue Jun 26 10:34:06 UTC 2018


On Tue, Jun 26, 2018 at 12:17 PM Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 23 June 2018 at 12:25, Jouke Witteveen via arch-projects
> <arch-projects at archlinux.org> wrote:
> > Strictly speaking, we should check with the SSIDEncoding value sent out
> > by the station, as specified in the 2012 version of 802.11 (page 566),
> > but wpa_supplicant does not (yet) expose this information and stations
> > may not set the field to UTF-8 and still encode their SSID accordingly.
> >
> I wonder if iwd (meant to be wpa_supplicant replacement) could help here.
> Be that by exposing SSIDEncoding or setting it, as it detects UTF-8 in the SSID.

As far as I can tell, only developers of iwd think of iwd as a
wpa_supplicant replacement. Currently, it is lacking a CLI and
documentation. Moreover, wpa_supplicant is tried and tested. While I
try to not tie netctl in too strongly with any specific client,
wpa_supplicant will likely be the client of choice for netctl for the
foreseeable future.

I submitted a patch to wpa_supplicant for exposing the UTF-8 SSID bit:
http://lists.infradead.org/pipermail/hostap/2018-June/038658.html
However, experimentation showed that it is not really used (yet?).

>
> > @@ -38,6 +43,9 @@ init_profiles() {
> >              unset Interface ESSID
> >              source "$PROFILE_DIR/$profile" > /dev/null
> >              if [[ "$Interface" = "$1" && -n "$ESSID" ]]; then
> > +                if [[ "$ESSID" = \"\"*\" ]]; then
> > +                    ESSID=${ESSID:2:-1}
> > +                fi
> FYI, I will send out a small patch which simplifying init_profiles.
> It will cause a trivial conflict so I can rebase it on top of this
> patch, if you prefer.

Note that the above code is more about matching multiple encodings of
ESSIDs than about the UTF-8 conversion per se.

Thanks for being so quick with your patch!

>
> > @@ -221,6 +237,8 @@ ensure_root "$(basename "$0")"
> >  if ! type dialog &> /dev/null; then
> >      exit_error "Please install 'dialog' to use wifi-menu"
> >  fi
> > +CHARMAP=$(locale charmap)
> > +cd /  # We do not want to spawn anything that can block unmounting
> >
> Was the "cd /" line moved by mistake?

No. It was moved because it fits better (semantically) in this section
of the code.

> Other than the cd nitpick, the patch looks great. FWIW
> Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
>

I'll reply to your patch in the other mail.

Regards,
- Jouke


More information about the arch-projects mailing list