hostapd fails with "Invalid ipaddr_type_availability" when configured for IPv6 only
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hostapd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'm running an IPv6-only WLAN (a typical NAT64/DNS64 setup) and I believe I'm having my config rejected erroneously when attempting to advertise a total lack of IPv4 networking.
In /etc/hostapd/
# IP Address Type Availability
# format: <1-octet encoded value as hex str>
# (ipv4_type & 0x3f) << 2 | (ipv6_type & 0x3)
# ipv4_type:
# 0 = Address type not available
# 1 = Public IPv4 address available
# 2 = Port-restricted IPv4 address available
# 3 = Single NATed private IPv4 address available
# 4 = Double NATed private IPv4 address available
# 5 = Port-restricted IPv4 address and single NATed IPv4 address available
# 6 = Port-restricted IPv4 address and double NATed IPv4 address available
# 7 = Availability of the address type is not known
# ipv6_type:
# 0 = Address type not available
# 1 = Address type available
# 2 = Availability of the address type not known
ipaddr_
When I attempt to start hostapd, I get the following error:
# hostapd -d /etc/hostapd/
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/
Line 13: Invalid ipaddr_
1 errors found in configuration file '/etc/hostapd/
Failed to set up interface with /etc/hostapd/
hostapd_init: free iface 0x55fd5f7c0710
Failed to initialize interface
If I set ipaddr_
I believe this is a bug because the documentation suggests that having no IPv4 availability is a valid configuration.
A month later, I just realised this works:
ipaddr_ type_availabili ty=01
It needs to be zero-padded to 2 digits to work. Go figure.