dsmasq required for AP/Hotspot



please be kind - first post!

[exec summary]
issues with AP in NetworkManager, won't start with out dnsmasq but runs fie without it
don't know who or where to tell this story - starting here

[backstory]

I have been fooling around with hotspots on raspberry pi's using hostapd, but to use hostapd it seemed I need to not have NetworkManager and wpa_supplicant running.  Well, at least  I couldn't figure out how to create a wifi interface without an ssid, which I am not sure if it was an issue or not, but I could do that through network.service.

i previously went completely without networkmanaager and had everything working fine (via hostapd).  On the new build I started with NetowrkManager to learn more about it.

In looking to start the Hotspot again, I decided a split configuration wasn't a good idea (why manage two interfaces two different ways (i.e. NetworkManager and network.service)). In messing about and googling I found the hotspot ability through networkmanage and thought I would give it a go.

[the issue]

in setting it up - it would fail with:

Error: Connection activation failed: IP configuration could not be reserved (no available address, timeout, etc.)

going through the logs it turns out having an AP/Hotspot seems to require dnsmasq

Aug 02 00:03:14 host NetworkManager[240]: <error> [1533193394.9226] device (wlan0): share: (wlan0) failed to start dnsmasq: Could not find "dnsmasq" binary

yet - it isn't really required - the pi I am doing this on is running named and dhcpd
so when the interface tries to start dnsmasq - it errors out with this ...

Aug 01 23:39:13 host NetworkManager[240]: <info>  [1533191953.8456] dnsmasq-manager: starting dnsmasq...
Aug 01 23:39:13 host NetworkManager[240]: dnsmasq: failed to create listening socket for 192.168.99.1: Address already in use
Aug 01 23:39:13 host dnsmasq[405]: failed to create listening socket for 192.168.99.1: Address already in use
Aug 01 23:39:13 host dnsmasq[405]: FAILED to start up
Aug 01 23:39:13 host NetworkManager[240]: <info>  [1533191953.9504] device (wlan0): Activation: successful, device activated.
Aug 01 23:39:13 host NetworkManager[240]: <info>  [1533191953.9529] manager: startup complete
Aug 01 23:39:13 host NetworkManager[240]: <warn>  [1533191953.9537] dnsmasq-manager: dnsmasq exited with error: Network access problem (address in use, permissions) (2)

[test/repeat]

<assuming we start in a working state>

# nmcli con down wlan0_ap
# nmcli con show
# dnf remove dnsmasq
# nmcli con up wlan0_ap
 -- get error
Error: Connection activation failed: IP configuration could not be reserved (no available address, timeout, etc.)

# dnf install dnsmasq
# nmcli con up wlan0_ap
 -- starts - no error at command line
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/15)

and hotspot works, access works.

system log/journalctl shows

Aug 02 00:18:09 host NetworkManager[240]: <info>  [1533194289.0032] dnsmasq-manager: starting dnsmasq...
Aug 02 00:18:09 host NetworkManager[240]: dnsmasq: failed to create listening socket for 192.168.99.1: Address already in use
Aug 02 00:18:09 host dnsmasq[1981]: failed to create listening socket for 192.168.99.1: Address already in use
Aug 02 00:18:09 host NetworkManager[240]: <warn>  [1533194289.0374] dnsmasq-manager: dnsmasq exited with error: Network access problem (address in use, permissions) (2)
Aug 02 00:18:09 host dnsmasq[1981]: FAILED to start up

[fix]

probe to see what is needed?
I know this is difficult because i am gathering it is for a desktop environment and you don't want users having to set this stuff up - but silently requiring dnsmasq is a problem already (unless more clever OS's automagically retrieve it), and erroring our but working is, well, messy.

i think i am going to remove the dnsmasq package and create a dnsmasq shell script that just returns 0, unless there is a better option?

thanks - if this isn't the right place for this let me know where to go!

c




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]