hostapd fails with "Invalid ipaddr_type_availability" when configured for IPv6 only

Bug #1627484 reported by Russell Phillips
6
This bug affects 1 person
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/hostapd.conf, I have ipaddr_type_availability set to "1", to signify that IPv4 is not availabile, but IPv6 is:

# 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_type_availability=1

When I attempt to start hostapd, I get the following error:

# hostapd -d /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
Line 13: Invalid ipaddr_type_availability '1'
1 errors found in configuration file '/etc/hostapd/hostapd.conf'
Failed to set up interface with /etc/hostapd/hostapd.conf
hostapd_init: free iface 0x55fd5f7c0710
Failed to initialize interface

If I set ipaddr_type_availability to "1D" (unknown IPv4/IPv6 available), hostapd will run without issue - but it's advertising that the IPv4 availability is unknown, which isn't quite what I was looking for.

I believe this is a bug because the documentation suggests that having no IPv4 availability is a valid configuration.

Revision history for this message
Russell Phillips (ignissport) wrote :

A month later, I just realised this works:

ipaddr_type_availability=01

It needs to be zero-padded to 2 digits to work. Go figure.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.