Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Clarify options, and make backups when installing create_ap.conf file #434

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

dlenski
Copy link

@dlenski dlenski commented Mar 25, 2020

  • Add additional comments clarifying the behavior of DNS/DHCP-related options
  • Create backups so that user doesn't inadvertently clobber create_ap.conf when installing a newer version

@dlenski dlenski mentioned this pull request Apr 5, 2020
dlenski added 2 commits April 15, 2020 20:27
Uses the /lib/systemd/system-sleep mechanism.
See https://www.freedesktop.org/software/systemd/man/systemd-suspend.service.html for how this works.

For unclear reasons, this only works in /lib/systemd/system-sleep, not in /usr/lib/systemd/system-sleep.

(ping oblique#153, oblique#167)
@dlenski dlenski force-pushed the master branch 2 times, most recently from 2af7132 to b14e6a1 Compare April 19, 2020 09:17
…ate_ap.conf comments

Also makes it *possible* to set ADDN_HOSTS via create_ap.conf
Use 'sudo create_ap --wps-pbc <id>' to simulate the button being pushed,
or 'sudo create_ap --wps-pin <id>,<pin>' to enroll a specific PIN
requested by a device.
exuvo and others added 2 commits December 3, 2023 13:52
I added WPS push-button and PIN modes in 86a3d60, but now they don't work
for me. Apparently:

1. hostapd's built in EAP server *must* be enabled in order for WPS to
   complete.

   (Did this ever actually work for me previously, without this??)

2. Also, the 'push_button' method seems to have been replaced with
   'virtual_push_button', per the following warning message from hostapd
   (v2.9):

   ```
   WPS: Converting push_button to virtual_push_button for WPS 2.0 compliance
   ```
…d be used sparingly

This extremely useful StackExchange post summarizes the different ways of
indicating this to clients: https://unix.stackexchange.com/a/631812

1. Microsoft's "network cost information element"
   (https://learn.microsoft.com/fi-fi/windows-hardware/drivers/mobilebroadband/network-cost-information-element)
   which seems to be quasi-standard at this point.

   Recent versions of NetworkManager also understand it, but due to a
   mistake in earlier versions of Microsoft's documentation, older versions
   parse the element incorrectly (gory details at
   https://openwrt.org/docs/guide-user/network/wifi/ms-meteredconnection#under_the_hood).

2. Apple's vendor element
   (https://apple.stackexchange.com/a/457630) seems to be undocumented,
   but it can be copied/used as is.

3. Adding the value "ANDROID_METERED" as part of the force-sent DHCP option
   43 causes Android devices to perceive this wireless network as metered
   (see https://unix.stackexchange.com/a/631812 as well as
   https://www.lorier.net/docs/android-metered.html).
These were needed because of an annoying bug in old versions of
'hostapd', where the kernel's entropy pool was used incorrectly, and 'hostapd'
would decide that there wasn't enough randomness available, e.g.:

    random: Only 9/20 bytes of strong random data available from /dev/random
    random: Not enough entropy pool available for secure operations
    WPA: Not enough entropy in random pool for secure operations - update keys later when the first station connects

That issue has been fixed since hostapd v2.6, released in 2016
(https://packetstormsecurity.com/files/156573/Hostapd-Insufficient-Entropy.html),
so there's really no reason for 'create_ap' to have an entropy-checking
watchdog or to encourage users to install 'haveged'.
…tem-sleep

For unclear reasons, this only worked for me on Ubuntu 16.04 if it was put
in `/lib/systemd/system-sleep`, and NOT in `/usr/lib/systemd/system-sleep`.

I'm unsure if this was a systemd bug, a distro bug, or what… but it's
probably no longer applicable on modern distros.

Fix it, and leave behind a warning comment.

Thanks to @exuvo for bringing this up in
#1.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants