Claudio Jeker([email protected]) on 2019.03.09 10:47:46 +0100:
> The reshuffle for l3vpn broke announce inet none.
> The problem is that it actually clears way too much since the loop is not
> correctly skipped.
> This should fix configs where people use any kind of 'announce X none'
ok benno@
>
> --
> :wq Claudio
>
> PS: how should configs like:
> announce inet vpn
> announce inet none
> work? I assume this may need more work.
> Maybe this should be changed to
> announce inet vpn
> no announce inet unicast
i always thought that the way the syntax worked in this area was not
obvious, we could use the opportunity to make it better (it already got
better by removing the mixing with the "announce self").
I think i like changing it to "no" prefix notation.
/Benno
> Index: parse.y
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v
> retrieving revision 1.382
> diff -u -p -r1.382 parse.y
> --- parse.y 7 Mar 2019 07:42:36 -0000 1.382
> +++ parse.y 9 Mar 2019 08:49:07 -0000
> @@ -1348,7 +1348,8 @@ peeropts : REMOTEAS as4number {
>
> if ($3 == SAFI_NONE) {
> for (aid = 0; aid < AID_MAX; aid++) {
> - if (aid2afi(aid, &afi, &safi) == -1)
> + if (aid2afi(aid, &afi, &safi) == -1 ||
> + afi != $2)
> continue;
> curpeer->conf.capabilities.mp[aid] = 0;
> }
>