Skip to content
Contents
GuidesOpenWrt

OpenWrt table_family explained when only the IPv4 set fills

For a table headed inet gm, use inet for table_family and gm for table. An IPv6-only set inside that table still belongs to inet. Read each set’s element type separately.

For a table headed inet gm, use inet for table_family and gm for table. An IPv6-only set inside that table still belongs to inet. Read each set’s element type separately.

Why is the set empty despite an AAAA answer?

In an isolated OpenWrt 25.12.6 x86/64 VM, dnsmasq-full 2.93 queried a local test upstream for dual.test. With separate sections for the same domain, both addresses came back but only sites4 gained an entry. The serial log below shows this particular run.

OpenWrt 25.12.6 · dnsmasq 2.93 · 2 × config ipset
OpenWrt 25.12.6 · dnsmasq 2.93 · 2 × config ipset

Group both targets under one domain

Check over SSH. The build must include nftset. The example assumes existing sets of type ipv4_addr and ipv6_addr respectively. Create missing sets in persistent firewall configuration first. For inet fw4, replace gm with fw4. Tables of family ip or ip6 handle only their own address family.

dnsmasq --version
nft list sets
nft list set inet gm sites4
nft list set inet gm sites6

Check the mapping in LuCI under Network → DHCP and DNS. Back up /etc/config/dhcp and edit it directly if fields are missing. Replace only the duplicate mapping, preserving other domains. Substitute your dual-stack domain for dual.test. Omit a shared family so the script can distinguish sites4 from sites6.

config ipset
    list name 'sites4'
    list name 'sites6'
    list domain 'dual.test'
    option table 'gm'
    option table_family 'inet'

Restart dnsmasq after saving. DNS pauses briefly. Inspect the active configuration. Both prefixed targets should appear on one line, in either order.

/etc/init.d/dnsmasq restart
grep '^nftset=' /var/etc/dnsmasq.conf.*
nftset=/dual.test/4#inet#gm#sites4,6#inet#gm#sites6

Verify with fresh addresses

Run this on the router with an uncached name whose addresses are absent from both sets. Compare the answers with elements. Both sets filled in our second run. Leave production sets intact.

nslookup dual.test 127.0.0.1
nft list set inet gm sites4
nft list set inet gm sites6
OpenWrt 25.12.6 · dnsmasq 2.93 · 1 × config ipset
OpenWrt 25.12.6 · dnsmasq 2.93 · 1 × config ipset

If an answer is missing, check upstream first. Otherwise check the serving instance, set types and generated line, then repeat from a LAN client. Verify routing separately. If startup fails or other domains break, restore the backup, restart again and check normal resolution.

Why does dnsmasq-full lack ipset on OpenWrt 24.10.0?

Explore hardware

Comments