8ead9afa59f713c4b12bf09f47d528da1644bb24
[openwrt/openwrt.git] / package / dnsmasq / patches / 0001-Set-prefix-on-link-bit-in-RAs.patch
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
5
6 ---
7 CHANGELOG | 3 +++
8 src/radv.c | 4 ++--
9 2 files changed, 5 insertions(+), 2 deletions(-)
10
11 diff --git a/CHANGELOG b/CHANGELOG
12 index 8828694..e1daeef 100644
13 --- a/CHANGELOG
14 +++ b/CHANGELOG
15 @@ -45,6 +45,9 @@ version 2.63
16 uk.org.thekelleys.dnsmasq. Thanks to Mathieu
17 Trudel-Lapierre for the patch.
18
19 + Set the "prefix on-link" bit in Router
20 + Advertisements. Thanks to Gui Iribarren for the patch.
21 +
22
23 version 2.62
24 Update German translation. Thanks to Conrad Kostecki.
25 diff --git a/src/radv.c b/src/radv.c
26 index a3e691a..d1f5268 100644
27 --- a/src/radv.c
28 +++ b/src/radv.c
29 @@ -412,8 +412,8 @@ static int add_prefixes(struct in6_addr *local, int prefix,
30 opt->type = ICMP6_OPT_PREFIX;
31 opt->len = 4;
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);
39 opt->reserved = 0;
40 --
41 1.7.10.GIT
42