Skip to content

Commit

Permalink
Add RA_names support to dnsmasq
Browse files Browse the repository at this point in the history
Basically, it:
 - does router-advertisment (not dhcpv6)
 - when it gets a request for RA, it looks up if there is an active ipv4
 lease for the same host via its MAC address, and if there is it adds
 the to-be ipv6 to the local dns (assuming the host will take the dns)
 - when it gets a dhcpv4 release it takes off the ipv6 dns record as
 well

config dhcp 'lan'
	option interface 'lan'
	option ra_names '2001:dead:beef::'

As well as:
IPv6 options are specified using the option6: keyword, followed by the
option number or option name. The IPv6 option name space is disjoint
from the IPv4 option name space. IPv6 addresses in options must be
bracketed with square brackets,
eg. --dhcp-option=option6:ntp-server,[1234::56]

config 'dhcp'
	option 'interface' 'lan'
	list 'dhcp_option' 'option6:dns-server,[2001:dead:beef::1]'

See http://patchwork.openwrt.org/patch/2354/ for discussion
  • Loading branch information
Dave Taht committed Aug 21, 2012
1 parent 9aec4fc commit 3d03a71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package/dnsmasq/files/dnsmasq.init
Expand Up @@ -157,6 +157,10 @@ dnsmasq() {
}

dhcp_option_add "$cfg" "" 0
config_get ra_names "$cfg" ra_names
[ -n "$ra_names" ] && {
xappend "--dhcp-range=$networkid,$ra_names,ra-names,$leasetime"
}

echo >> $CONFIGFILE
}
Expand Down

0 comments on commit 3d03a71

Please sign in to comment.