<div dir="ltr"><div style="color:rgb(51,51,51);background-color:rgb(245,245,245);font-family:Menlo,Monaco,"Courier New",monospace;font-size:14px;line-height:21px;white-space:pre"><div><span style="color:rgb(119,119,119)">#</span><span style="color:rgb(170,55,49)"> </span><span style="color:rgb(170,55,49);font-weight:bold">Title</span></div><br><div>Reconfiguring <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">import keep filtered</span><span style="color:rgb(119,119,119)">`</span> from off to on does not preserve already rejected routes</div><br><div><span style="color:rgb(119,119,119)">#</span><span style="color:rgb(170,55,49)"> </span><span style="color:rgb(170,55,49);font-weight:bold">Description</span></div><br><div>Changing a channel from <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">import keep filtered off</span><span style="color:rgb(119,119,119)">`</span> to <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">import keep filtered on</span><span style="color:rgb(119,119,119)">`</span> does not cause existing rejected routes to be reprocessed. Two histories with the same final static route, import filter, and <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">import keep filtered on</span><span style="color:rgb(119,119,119)">`</span> setting end with different filtered-route state.</div><br><div>When the route is present before <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">import keep filtered</span><span style="color:rgb(119,119,119)">`</span> is enabled, it has already been dropped and is not re-fed after reconfiguration. When BIRD starts directly with the final configuration, the same route is retained as filtered.</div><br><div><span style="color:rgb(119,119,119)">#</span><span style="color:rgb(170,55,49)"> </span><span style="color:rgb(170,55,49);font-weight:bold">Version</span></div><br><div>Reproduced with:</div><br><div><span style="color:rgb(119,119,119)">```</span>text</div><div>BIRD 2.18+branch.master.f0f859c26cf9</div><div><span style="color:rgb(119,119,119)">```</span></div><br><div><span style="color:rgb(119,119,119)">#</span><span style="color:rgb(170,55,49)"> </span><span style="color:rgb(170,55,49);font-weight:bold">How to reproduce</span></div><br><div><span style="color:rgb(119,119,119)">1.</span><span style="color:rgb(75,105,198)"> Use a single BIRD instance. No external peers are required.</span></div><br><div><span style="color:rgb(75,105,198)">   </span><span style="color:rgb(119,119,119)">```</span><span style="color:rgb(75,105,198)">text</span></div><div><span style="color:rgb(75,105,198)">                +-------------+</span></div><div><span style="color:rgb(75,105,198)">                |     r1      |</span></div><div><span style="color:rgb(75,105,198)">                |             |</span></div><div><span style="color:rgb(75,105,198)">                | BIRD static |</span></div><div><span style="color:rgb(75,105,198)">                +-------------+</span></div><div><span style="color:rgb(75,105,198)">   </span><span style="color:rgb(119,119,119)">```</span></div><br><div><span style="color:rgb(119,119,119)">2.</span><span style="color:rgb(75,105,198)"> Configure a static protocol route:</span></div><br><div><span style="color:rgb(75,105,198)">   </span><span style="color:rgb(119,119,119)">```</span><span style="color:rgb(75,105,198)">bird</span></div><div><span style="color:rgb(75,105,198)">   protocol static static_reject {</span></div><div><span style="color:rgb(75,105,198)">       ipv4 {</span></div><div><span style="color:rgb(75,105,198)">           import filter {</span></div><div><span style="color:rgb(75,105,198)">               if net = <a href="http://198.51.80.0/24">198.51.80.0/24</a> then reject;</span></div><div><span style="color:rgb(75,105,198)">               accept;</span></div><div><span style="color:rgb(75,105,198)">           };</span></div><div><span style="color:rgb(75,105,198)">           import keep filtered off;</span></div><div><span style="color:rgb(75,105,198)">       };</span></div><br><div><span style="color:rgb(75,105,198)">       route <a href="http://198.51.80.0/24">198.51.80.0/24</a> unreachable;</span></div><div><span style="color:rgb(75,105,198)">   }</span></div><div><span style="color:rgb(75,105,198)">   </span><span style="color:rgb(119,119,119)">```</span></div><br><div><span style="color:rgb(119,119,119)">3.</span><span style="color:rgb(75,105,198)"> Start BIRD and confirm the rejected route is not retained as filtered:</span></div><br><div><span style="color:rgb(75,105,198)">   </span><span style="color:rgb(119,119,119)">```</span><span style="color:rgb(75,105,198)">bash</span></div><div><span style="color:rgb(75,105,198)">   </span>birdc show protocols all static_reject</div><div><span style="color:rgb(75,105,198)">   </span><span style="color:rgb(119,119,119)">```</span></div><br><div><span style="color:rgb(119,119,119)">4.</span><span style="color:rgb(75,105,198)"> Reconfigure only the channel option from </span><span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">import keep filtered off</span><span style="color:rgb(119,119,119)">`</span><span style="color:rgb(75,105,198)"> to </span><span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">import keep filtered on</span><span style="color:rgb(119,119,119)">`</span><span style="color:rgb(75,105,198)">, keeping the same static route and same import filter.</span></div><br><div><span style="color:rgb(119,119,119)">5.</span><span style="color:rgb(75,105,198)"> Check the protocol counters again:</span></div><br><div><span style="color:rgb(75,105,198)">   </span><span style="color:rgb(119,119,119)">```</span><span style="color:rgb(75,105,198)">bash</span></div><div><span style="color:rgb(75,105,198)">   </span>birdc show protocols all static_reject</div><div><span style="color:rgb(75,105,198)">   </span>birdc show route filtered protocol static_reject all</div><div><span style="color:rgb(75,105,198)">   </span><span style="color:rgb(119,119,119)">```</span></div><br><div><span style="color:rgb(119,119,119)">6.</span><span style="color:rgb(75,105,198)"> As a control, restart BIRD directly with the final configuration (</span><span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">import keep filtered on</span><span style="color:rgb(119,119,119)">`</span><span style="color:rgb(75,105,198)">) and the same static route/filter, then compare the same outputs.</span></div><br><div><span style="color:rgb(119,119,119)">#</span><span style="color:rgb(170,55,49)"> </span><span style="color:rgb(170,55,49);font-weight:bold">Expected behavior</span></div><br><div>Because both histories end with the same route, the same import filter, and <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">import keep filtered on</span><span style="color:rgb(119,119,119)">`</span>, BIRD should retain the rejected route as filtered in both cases. The protocol route counters should report one filtered route.</div><br><div><span style="color:rgb(119,119,119)">#</span><span style="color:rgb(170,55,49)"> </span><span style="color:rgb(170,55,49);font-weight:bold">Actual behavior</span></div><br><div>History A reports no retained filtered route:</div><br><div><span style="color:rgb(119,119,119)">```</span>text</div><div>Routes:         0 imported, 0 filtered, 0 exported, 0 preferred</div><div><span style="color:rgb(119,119,119)">```</span></div><br><div>History B reports the expected filtered route:</div><br><div><span style="color:rgb(119,119,119)">```</span>text</div><div>Routes:         0 imported, 1 filtered, 0 exported, 0 preferred</div><div><span style="color:rgb(119,119,119)">```</span></div><br><div><span style="color:rgb(119,119,119)">#</span><span style="color:rgb(170,55,49)"> </span><span style="color:rgb(170,55,49);font-weight:bold">Additional context</span></div><br><div><span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">import keep filtered</span><span style="color:rgb(119,119,119)">`</span> changes how rejected routes are represented in channel state. The suspected path is <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">nest/proto.c:channel_reconfigure()</span><span style="color:rgb(119,119,119)">`</span>, which handles several channel changes but does not appear to trigger a reload/refeed for <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">in_keep_filtered</span><span style="color:rgb(119,119,119)">`</span> changes. <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">nest/rt-table.c:rte_update2()</span><span style="color:rgb(119,119,119)">`</span> decides whether rejected routes are dropped or retained as <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">REF_FILTERED</span><span style="color:rgb(119,119,119)">`</span> based on <span style="color:rgb(119,119,119)">`</span><span style="color:rgb(156,93,39)">c->in_keep_filtered</span><span style="color:rgb(119,119,119)">`</span>, so changing that flag without refeeding existing routes leaves history-dependent filtered state.</div><br></div></div>