1 From fd05f127909bbf4f6983a4de2dcb611947488dee Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Sun, 12 Aug 2012 17:48:50 +0100
4 Subject: [PATCH] Set prefix on-link bit in RAs
9 2 files changed, 5 insertions(+), 2 deletions(-)
11 diff --git a/CHANGELOG b/CHANGELOG
12 index 8828694..e1daeef 100644
15 @@ -45,6 +45,9 @@ version 2.63
16 uk.org.thekelleys.dnsmasq. Thanks to Mathieu
17 Trudel-Lapierre for the patch.
19 + Set the "prefix on-link" bit in Router
20 + Advertisements. Thanks to Gui Iribarren for the patch.
24 Update German translation. Thanks to Conrad Kostecki.
25 diff --git a/src/radv.c b/src/radv.c
26 index a3e691a..d1f5268 100644
29 @@ -412,8 +412,8 @@ static int add_prefixes(struct in6_addr *local, int prefix,
30 opt->type = ICMP6_OPT_PREFIX;
32 opt->prefix_len = prefix;
33 - /* autonomous only if we're not doing dhcp */
34 - opt->flags = do_slaac ? 0x40 : 0x00;
35 + /* autonomous only if we're not doing dhcp, always set "on-link" */
36 + opt->flags = do_slaac ? 0xC0 : 0x80;
37 opt->valid_lifetime = htonl(time);
38 opt->preferred_lifetime = htonl(deprecate ? 0 : time);