#17457: dnsmasq: add AAAA DNS record for the router hostname, for local ipv6
lookups
-------------------------+-------------------------------------------------
Reporter: | Owner: developers
braveheart_leo@… | Status: new
Type: | Milestone: Chaos Calmer (trunk)
enhancement | Version: Trunk
Priority: normal | Keywords: dnsmasq ipv6 ping6 lookup host-
Component: base | record
system |
Resolution: |
-------------------------+-------------------------------------------------
Comment (by eric):
This is an exact copy of the IPV4 script part in /etc/init.d/dnsmasq. It
will only grab the "first" IPV6 so you should disable ULA by assigning a
blank string ''. Then only the global address is first. It would be more
complete to get the IPV6 list using /lib/functions/network.sh; however,
with IPV6 having so many possible assignment per interface a paring script
would need to be made for robustness.
{{{
# add own hostname
local lanaddr
local lanaddr6
[ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan"
&& {
local hostname="$(uci_get system @system[0] hostname
OpenWrt)"
dhcp_domain_add "" "$hostname" "$lanaddr"
}
[ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr6 lanaddr6
"lan" && {
local hostname6="$(uci_get system @system[0] hostname
OpenWrt)"
dhcp_domain_add "" "$hostname6" "$lanaddr6"
}
}}}
--
Ticket URL: <https://dev.openwrt.org/ticket/17457#comment:4>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets