<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Arial Narrow";
        panose-1:2 11 6 6 2 2 2 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
        {mso-style-priority:1;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        mso-fareast-language:EN-US;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:"Times New Roman","serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-fareast-language:EN-US;}
.MsoPapDefault
        {mso-style-type:export-only;
        margin-bottom:4.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1922787224;
        mso-list-type:hybrid;
        mso-list-template-ids:1582964716 68747279 68747289 68747291 68747279 68747289 68747291 68747279 68747289 68747291;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=RU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>Hi Simon,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>Latets git (2.61test7) brings several RA issues,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>My configuration (simplified):<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>HAVE_DHCP, HAVE_DHCPv6, HAVE_BROKEN_RTC<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>interface=br0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>dhcp-range=192.168.1.101,192.168.1.254,86400<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>dhcp-range=2001:470:xxxx:xxxx::,ra-only,64,2h<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>dhcp-option=option6:23,[::]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>I was trying to setup dual-stack environment with IPv6 SLAAC and DNS via DHCPv6<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>Usually it’s done by specifying Other bit in RA, while Managed is switched off. This allows host to configure address from the prefix, but ask DNS, Domain, etc via DHCPv6.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>Unfortunately, this config is quite impossible now, refer issues list:<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US style='font-family:"Times New Roman","serif"'><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-US style='font-family:"Times New Roman","serif"'>M+O bits are set if dhcv6 enabled only, and no bits set, if disabled. That means bits is always cleared with ra-only/ra-names, no matter set dhcp6 options or not.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US style='font-family:"Times New Roman","serif"'><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-US style='font-family:"Times New Roman","serif"'>Dhcp6 options without range will not create contexts, therefore dnsmasq doesn’t listen dhcp6 requests. So, without this pt.1 enhancement is pointless.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US style='font-family:"Times New Roman","serif"'><span style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-US style='font-family:"Times New Roman","serif"'>Periodic RA isn’t working, because alarm code goes into (dhcp || dhcp6) path and don’t trigger RA alarms<o:p></o:p></span></p><p class=MsoListParagraph><span lang=EN-US style='font-family:"Times New Roman","serif"'>Only other netlink/dhcpv4 events could trigger it. Also, even if fixed event logic leads to DHCP leases rewrite on every RA event by design.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US style='font-family:"Times New Roman","serif"'><span style='mso-list:Ignore'>4.<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-US style='font-family:"Times New Roman","serif"'>Router Solicitation messages doesn’t trigger send RA, due 2 reasons: icmp6fd isn’t in read fdset , and icmp6fd socket isn’t joined to ALL_ROUTERS group.<o:p></o:p></span></p><p class=MsoListParagraph><span lang=EN-US style='font-family:"Times New Roman","serif"'>All this because there’s no dhcp6 context configured for ra-only/ra-names<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>About prefix lifetimes, you refer rfc2462 in the code which is obsoleted by rfc4862.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>2 hours rules is only about Valid Lifetime, but Preferred Lifetime might be and usually is much smaller in dynamic v6 prefix environments.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>The problem is dnsmasq doesn’t use separate valid/preferred values, this leads to default gateway lost issue due some “server” reconfiguration when client still threat 2h prefix is valid and preferred.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>Not related to subject, but have to say.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>With HAVE_BROKEN_RTC lease file doesn’t contain expire time, but length, which is constant.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>So, after restart/reload all leases get prolonged lease time, and possibly never expired then.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'>Solution is quite simple – store not only lease length, but calculated remaining time too. With this values it’s possible to correct count all previous timings.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";mso-fareast-language:RU'>Best Regards, Vladislav Grishenko<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";mso-fareast-language:RU'>ICQ: 303357<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";mso-fareast-language:RU'>MSN: themiron@mail.ru<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";mso-fareast-language:RU'>Skype: the.miron<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>