<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="line-break:after-white-space"><div style="font-family:Helvetica,Arial;font-size:13px">Thank you, this is exactly what I needed!</div><div style="font-family:Helvetica,Arial;font-size:13px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px">Just made a simple bash script to clean BGP and it worked. Quite sure it could be better, but for my case it is good enough :)</div><div style="font-family:Helvetica,Arial;font-size:13px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px"><pre class="lang-bash s-code-block" style="margin-top:0px;margin-bottom:0px;padding:var(--su12);border:0px;font-variant-ligatures:normal;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;line-height:var(--lh-md);font-family:var(--ff-mono);font-kerning:inherit;font-feature-settings:inherit;font-size:var(--fs-body1);vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;background-color:var(--highlight-bg);border-radius:var(--br-md);color:var(--highlight-color)">#!/bin/bash
birdc sh pro | grep start | grep dynbgp | cut -d " " -f1 | while read line || [[ -n $line ]];
do
birdc disable $line
done
birdc configure</pre></div> <br> <div class="gmail_signature"></div> <br><p class="airmail_on">От 12 марта 2023 г. в 13:33:45, Maria Matejka via Bird-users (<a href="mailto:bird-users@network.cz">bird-users@network.cz</a>) написал:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>Hello!
<br>
<br>IIRC, the right way to do it is to call
<br>
<br> disable X;
<br>
<br>for X in all protocol names you want to clear, and then request
<br>reconfiguration which should clear them.
<br>
<br>BTW thank you for pointing at this feature. There is currently no
<br>automatic test suite for dynamic BGP and we should definitely add it.
<br>
<br>Maria
<br>
<br>On 3/12/23 09:19, Valery Lutoshkin wrote:
<br>> Hi,
<br>>
<br>> I use Bird 2.0.9 to spread a special list of prefixes via BGP to an
<br>> unknown list of users, so I use “neighbor range <a href="http://0.0.0.0/0">0.0.0.0/0</a>
<br>> <<a href="http://0.0.0.0/0">http://0.0.0.0/0</a>> external;” and a passive mode.
<br>>
<br>>
<br>> In this situation, there are some dynamic protocols created by port
<br>> scanners or some other one-time connections. It is not a big deal, but
<br>> after some time the “show protocol” output looks huge, and I presume
<br>> Bird eats more memory with several thousand connections.
<br>>
<br>>
<br>> The only way I found to clear those dynamic protocols was to restart
<br>> Bird, but this affects real users of the service.
<br>>
<br>>
<br>> Is there another way to clear unsuccessful dynamic protocols? I can
<br>> parse the list of it, but still I didn’t find a way to clear a specific
<br>> protocol, like “clear protocol dynbgp2049” or smth. The best way would
<br>> be to clear “all protocols in the start state”, but AFAIK right now
<br>> there is no command like that in Birdc.
<br>>
<br>>
<br>> Best regards,
<br>> Valery
<br></div></div></span></blockquote></body></html>