[Dnsmasq-discuss] Enable AdvOnLink bit on RAs
Gui Iribarren
gui at altermundi.net
Sun Aug 12 07:17:51 BST 2012
On Sat, Aug 11, 2012 at 1:14 PM, Gui Iribarren <gui at altermundi.net> wrote:
> Hello,
> Could this be changed, so that on-link bit is set to 1 by default? (i
> think it makes sense given dnsmasq normal use cases, and it's also the
> default in radvd)
For completeness sake, the following patch hardcodes said bit to 1.
It's applies to dnsmasq-2.62 release.
diff -r 14cb389b937e src/radv.c
--- a/src/radv.c Sun Aug 12 03:15:22 2012 -0300
+++ b/src/radv.c Sun Aug 12 03:15:41 2012 -0300
@@ -420,7 +420,7 @@
opt->len = 4;
opt->prefix_len = prefix;
/* autonomous only if we're not doing dhcp */
- opt->flags = do_slaac ? 0x40 : 0x00;
+ opt->flags = do_slaac ? 0xC0 : 0x80;
opt->valid_lifetime = htonl(time);
opt->preferred_lifetime = htonl(deprecate ? 0 : time);
opt->reserved = 0;
More information about the Dnsmasq-discuss
mailing list