Bug 284095 - net-mgmt/wifimgr: update from 1.23 to 1.25 – disused aspects of wpa_supplicant (eappsk, nai, server_nai); man page prefix change; and more
Summary: net-mgmt/wifimgr: update from 1.23 to 1.25 – disused aspects of wpa_supplican...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-16 09:59 UTC by Graham Perrin
Modified: 2025-01-21 23:53 UTC (History)
3 users (show)

See Also:
fbsd: maintainer-feedback+


Attachments
patch to update port to wifimgr-1.24 (1.16 KB, patch)
2025-01-19 16:28 UTC, J.R. Oldroyd
fbsd: maintainer-approval+
Details | Diff
patch to update port from wifimgr-1.23 to wifimgr-1.25 (1.16 KB, patch)
2025-01-21 17:01 UTC, J.R. Oldroyd
fbsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin 2025-01-16 09:59:32 UTC
For example, from /var/log/messages (without disclosing the content of my wpa_supplicant.conf): 

𡀦…
⋯ wpa_supplicant[32867]: Successfully initialized wpa_supplicant
⋯ wpa_supplicant[32867]: Line 31: unknown network field 'eappsk'.
⋯ wpa_supplicant[32867]: Line 32: unknown network field 'nai'.
⋯ wpa_supplicant[32867]: Line 33: failed to parse network block.
⋯ wpa_supplicant[32867]: Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
⋯ wpa_supplicant[32867]: : CTRL-EVENT-DSCP-POLICY clear_all
…

Is this a limitation of the base OS? Or something that might be fixed, or enhanced, in the WiFi Networks Manager application?
Comment 1 Graham Perrin 2025-01-16 10:05:18 UTC
Maybe relevant: 

<https://github.com/freebsd/freebsd-src/blob/main/contrib/wpa/src/eap_common/eap_psk_common.c>

<https://github.com/freebsd/freebsd-src/blob/main/contrib/wpa/src/eap_common/eap_psk_common.h>

Preceding this report, a thread in the 'wi-fi hacking' channel in FreeBSD Discord: 

<https://discord.com/channels/727023752348434432/1328579995572113428>

> WiFi Networks Manager: configuration for eduroam
Comment 2 J.R. Oldroyd 2025-01-16 13:42:42 UTC
It appears that config fields "eappsk" and "nai" have been removed from wpa_supplicant.  See this note in src/contrib/wpa/wpa_supplicant/ChangeLog:

2008-02-22 - v0.6.3
        * removed 'nai' and 'eappsk' network configuration variables that were
          previously used for configuring user identity and key for EAP-PSK,
          EAP-PAX, EAP-SAKE, and EAP-GPSK. 'identity' field is now used as the
          replacement for 'nai' (if old configuration used a separate
          'identity' value, that would now be configured as
          'anonymous_identity'). 'password' field is now used as the
          replacement for 'eappsk' (it can also be set using hexstring to
          present random binary data)

wifimgr still supports these parameters but your wpa_supplicant does not.

For now, you should remove the values you have for these fields and use the
"password" and "identity" fields instead per the note above.

I guess I should remove support for these fields from wifimgr.

I would note that these fields are still documented in wpa_supplicant.conf(5) so that probably needs updating to remove them too.
Comment 3 J.R. Oldroyd 2025-01-18 05:16:31 UTC
While preparing an update to wifimgr to remove the "nai" and "eappsk" parameters, I noticed this in the wpa_supplicant ChangeLog file:

2005-09-25 - v0.4.5
        ...
        * updated EAP-PSK to use draft 9 by default since this can now be
          tested with hostapd; removed support for draft 3, including
          server_nai configuration option from network blocks
        ...

It looks like the parameter "server_nai" was also removed, in fact as long ago as back in 2005 !!

So "server_nai" will also be removed from wifimgr.
Comment 4 J.R. Oldroyd 2025-01-19 16:28:17 UTC
Created attachment 256811 [details]
patch to update port to wifimgr-1.24

Version 1.24
- Removed support for server_nai which was dropped from wpa_supplicant
  in 2005-09-25 - v0.4.5.
- Removed support for nai and eappsk which were dropped from
  wpa_supplicant in 2008-02-22 - v0.6.3.
- Added prototype for gui_init();
- Move man page from ${PREFIX}/man to ${PREFIX}/share/man.
- Add support for -fPIC when compiling with "WITH_PIE=yes".
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2025-01-21 14:10:08 UTC
(In reply to J.R. Oldroyd from comment #4)

Note that -fpie/-fPIE, not -fpic/-fPIC are correct when compiling with PIE.  Though -fpic/-fPIC also work, albeit at slightly degraded performance in some cases.
Comment 6 J.R. Oldroyd 2025-01-21 17:01:18 UTC
Created attachment 256880 [details]
patch to update port from wifimgr-1.23 to wifimgr-1.25

Thanks, Robert.

New version 1.25 generated, changing from -fPIC to -fPIE.

Port patch updated to update port from 1.23 to 1.25.
Comment 7 commit-hook freebsd_committer freebsd_triage 2025-01-21 23:48:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ae26cb6510b8185cca6951a057f73ae26991d172

commit ae26cb6510b8185cca6951a057f73ae26991d172
Author:     J.R. Oldroyd <fbsd@opal.com>
AuthorDate: 2025-01-21 14:09:04 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-01-21 23:46:35 +0000

    net-mgmt/wifimgr: update to 1.25

    Version 1.24 / 1.25
    - Removed support for server_nai which was dropped from wpa_supplicant
      in 2005-09-25 - v0.4.5.
    - Removed support for nai and eappsk which were dropped from
      wpa_supplicant in 2008-02-22 - v0.6.3.
    - Added prototype for gui_init();
    - Move man page from ${PREFIX}/man to ${PREFIX}/share/man.
    - Add support for -fPIE when compiling with "WITH_PIE=yes".

    PR:             284095
    Reported by:    Graham Perrin <grahamperrin@gmail.com>

 net-mgmt/wifimgr/Makefile | 7 +------
 net-mgmt/wifimgr/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 9 deletions(-)
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2025-01-21 23:53:06 UTC
Thank you for your contribution.