On Thu, Jul 5, 2012 at 3:38 PM, Dominique Martinet
<asmad...@codewreck.org> wrote:
> 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)

This is gorgeous Dominique,
My planned hack involved ladvd and flooding the network with LLDP
packets, then parse the info inside those packets and spew it in
/tmp/dhcp.leases
I was just waiting for ladvd dev to patch the source so that it can
compile cleanly on OpenWrt.
While that scheme doesn't depend on ipv4, ra_names is definitely more
elegant and as long as double-stack is the standard, i'll buy it!

> 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::'

I understand this serves the double purpose of activating this
feature, and at the same time making dnsmasq send RA, so no radvd is
needed
 or does it depend on RA sent by radvd ?
in the second case, wouldn't it make sense to get the "prefix" config
directly from /etc/config/radvd instead of duplicating information?

>
>
> (Note: it doesn't seem to add the local dns with a fe80:: prefix)

It shouldn't, AFAIU link-local addresses are not meant to be resolved,
since they always need the interface scope suffix

>

>
> 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
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to