Hi, (I just subscribed to the list, so sorry if my mail format isn't right somehow. I quickly glanced at the archive and don't think what I offer has been looked at, aside of a quick reference to the changelog when the feature wasn't available in a stable release of dnsmasq yet)
ra_names is a feature introduced in dnsmasq 2.61, which is why I changed the rules to build something newer (and figured I might as well take it to 62) 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 (since RA is stateless and doesn't give the host name, I couldn't figure any better way without dhcpv6; I was about to hack something (with a very large axe and radvd) when I found out they've done it already :D) There are also modes for router-advertisment only which I haven't looked at, and a dhcpv6 client implementation that I didn't try yet either. The option I added is in the dhcp field, a "ra_name" option with the prefix to announce in RAs, i.e. config dhcp 'lan' option interface 'lan' option ra_names '2001:dead:beef::' (Note: it doesn't seem to add the local dns with a fe80:: prefix) Attached is the patch in svn format, feel free to ask if you prefer git's (I personally do but didn't look hard enough for the git repository!) Please give any comment and include something similar if you like it. Rergards, -- Dominique Martinet | Asmadeus
Index: package/dnsmasq/files/dnsmasq.init =================================================================== --- package/dnsmasq/files/dnsmasq.init (revision 32579) +++ package/dnsmasq/files/dnsmasq.init (working copy) @@ -360,6 +360,12 @@ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}" dhcp_option_add "$cfg" "$networkid" + + config_get ra_names "$cfg" ra_names + + [ -n "$ra_names" ] && { + xappend "--dhcp-range=$networkid,$ra_names,ra-names,$leasetime" + } } dhcp_option_add() { Index: package/dnsmasq/patches/101-ipv6.patch =================================================================== --- package/dnsmasq/patches/101-ipv6.patch (revision 32579) +++ package/dnsmasq/patches/101-ipv6.patch (working copy) @@ -1,13 +0,0 @@ ---- a/src/config.h -+++ b/src/config.h -@@ -263,8 +263,9 @@ NOTES: - /* We assume that systems which don't have IPv6 - headers don't have ntop and pton either */ - --#if defined(INET6_ADDRSTRLEN) && defined(IPV6_V6ONLY) && !defined(NO_IPV6) -+#if defined(INET6_ADDRSTRLEN) && !defined(NO_IPV6) - # define HAVE_IPV6 -+# define IPV6_V6ONLY 26 - # define ADDRSTRLEN INET6_ADDRSTRLEN - # if defined(SOL_IPV6) - # define IPV6_LEVEL SOL_IPV6 Index: package/dnsmasq/Makefile =================================================================== --- package/dnsmasq/Makefile (revision 32579) +++ package/dnsmasq/Makefile (working copy) @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_VERSION:=2.59 -PKG_RELEASE:=4 +PKG_VERSION:=2.62 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq -PKG_MD5SUM:=b5757ef2d7b651748eeebb88af29d7d6 +PKG_MD5SUM:=f47e5cb8f5bac6343f24b2dbe317ab40 PKG_INSTALL:=1
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel